You are on page 1of 114

iManage WorkSite Web Application

Integration Toolkit
Developers Guide
Version 8.5
Document Revision 2
August 2009
Notice
1999-2009 Autonomy Corporation plc and its affiliates. All rights reserved.
No part of this publication (hardcopy or electronic form) may be reproduced or transmitted, in any form or by any means, electronic, mechanical,
photocopying, recording, or otherwise, without the prior written consent of Autonomy Corporation plc and its affiliates. Information in this manual
is furnished under license by Autonomy Corporation plc and its affiliates and may only be used in accordance with the terms of the license
agreement. If this software or documentation directs you to copy materials, you must first have permission from the copyright owner of the
materials to avoid violating the law which could result in damages or other remedies.
Trademarks and Copyrights
Interwoven, iManage, ConfirmSite, ContentServices, ControlHub, DataDeploy, DeskSite, FileSite, iManage, iManage Universal Search, iManage
WorkSite, LiveSite, MediaBin, MetaCode, MetaTagger, OffSite, OpenDeploy, Primera, iManage RecordsManager, Scrittura, TeamPortal,
TeamSite, VisualAnnotate, WorkDocs, WorkPortal, WorkRoute, WorkSite, WorkSite Express Search, WorkTeam, the respective taglines, logos
and service marks are trademarks of Autonomy Corporation plc and its affiliates, which may be registered in certain jurisdictions. All other
trademarks are owned by their respective owners. Some or all of the information contained herein may be protected by patent numbers: US #
6,505,212, GBRI #1053523, US #6,480,944, US#5,845,270, US #5,430,812, US #5,754,704, US #5,347,600, AUS #735365, AU 7830068, GB
#GB2333619, US #5,845,067, US #6,675,299, US #5,835,037, AUS #632333, CAN #2,062,965, FRAN / GRBI / SPAI / SWED #480941, GERM
#69020564.3, KORS 10-0576487, J APA #2968582, MX #219522, NZ #516340, SING #109524, SG #89006, SG #89086, SG #74973, SG
#85502 US #5,065,447, US #6,609,184, US #6,141,017, US #5,990,950, US #5,821,999, US #5,805,217, US #5,838,832, US #5,867,221, US
#5,923,376, US #6,434,273, US #5,867,603, US #4,941,193, US #5,822,721, US #5,923,785, US #5,982,938, US #5,790,131, US #5,721,543,
US #5,982,441, US #5,857,036, US #6,697,532, US #6,792, 454, US #6,928,149, US #7,092,969 or other patents pending application for
Autonomy Corporation plc and its affiliates.
Autonomy Corporation plc
Cambridge Business Park
Cowley Rd
Cambridge
CB4 0WZ
Tel: +44 (0) 1223 448000
Fax: +44 (0) 1223 448001
Email: autonomy@autonomy.com
8/21/09
Copyright Notice
WorkSite Web Application Integration Toolkit Developers Guide 3

Contents
About This Book 11
Intended Audience. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Notation Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Manual Organization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Product Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Documentation Updates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Chapter 1: Using WorkSite Web ASP.Net and Java Script Controls 15
WorkSite Web Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Using WorkSite Web ASP.Net Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Adding Controls to an ASP.Net Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
ASP.Net Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Step 1: Reference the WebParts.dll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Step 2: Insert the Code for the ASP.Net Control . . . . . . . . . . . . . . . . . . . . . . 18
Step 3: Modify the Controls Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Quick Search Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Step 1: Reference the WebParts.dll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Step 2: Insert the Code for the Quick Search Control . . . . . . . . . . . . . . . . . . 23
Step 3: Modify the Controls Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Using WorkSite Web J avaScript Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Load the J avaScript Files from the WorkSite Web Directory. . . . . . . . . . . . . . . 24
Initialization Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Create the Links on the Demo Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Enter the Code for the WorkSite Web Controls . . . . . . . . . . . . . . . . . . . . . . . . . 27
WorkSiteWebPart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
WorkSiteQuickSearchPart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Open the Controls That Are Called by the Links . . . . . . . . . . . . . . . . . . . . . . . . 32
Using the WorkSite Web ASP.Net Control Demo . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Chapter 2: Addressable URLs for WorkSite Web Components Server 37
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Importing Documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Importing an Existing Document as a New Version. . . . . . . . . . . . . . . . . . . . . . 38
Importing a URL Document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Checking In Documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Contents
4 WorkSite Web Application Integration Toolkit Developers Guide

Checking Out Documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40


Downloading Documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Sending Documents via E-mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Viewing Document Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Viewing Related Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Viewing Document History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Viewing Where a Document Is Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Viewing a Document in HTML Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Refiling a Document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Editing or Viewing a Documents Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Editing or Viewing a Folder's Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Editing or Viewing a Workspace's Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Sending Links to Workspaces via Email. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Using the WorkSite Web Dialog Callback. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Chapter 3: Enhanced Browse Dialog 53
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Using Enhanced Browse Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Client-side Callback Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Chapter 4: WorkSite Web Service 59
Consuming the Web Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Description of the WorkSite Web Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Web Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Using Web Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Document Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
CreateDocuments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
CheckOut. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
CheckinReplaceOriginal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
CheckinNewVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
CheckinNewDocument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
CheckinUndo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
SetDocumentsProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
GetDocuments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
WorkSpace Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
CreateWorkspaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
SetWorkspacesProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
GetWorkspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Folder Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
CreateFolders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
SetFoldersProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
GetFolders. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
GetFolderContents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
GetSubFolders. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Searches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Contents
WorkSite Web Application Integration Toolkit Developers Guide 5

SearchDocuments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
SearchWorkspaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Other Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
CreateCustomAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
GetCustomAttributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
GetObjects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Substructures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
AclItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
AdditionalProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
CustomProperty. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
CustomAttribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
DocumentFolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
FolderSearchParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
FullTextSearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
HistoryItem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
NewWorkspace : Workspace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Notification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
ObjectSecurity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
OutputMask. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
ProfileError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
ProfileItem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
ProfileSearchParameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Recipient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
WorkSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
WSObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Enumerators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
AclType. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
imAccessRight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
imCheckOutOptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
imFolderAttributeID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
imFullTextSearchLocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
imProfileAttributeID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
imSearchAttributeType. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
imSearchEmail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
imSecurityType. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Chapter 5: Workspace Creation Web Service 101
Consuming the Web Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Contents
6 WorkSite Web Application Integration Toolkit Developers Guide

WorkSite Web Application Integration Toolkit Developers Guide 7

Figures
Figure 1 IWOV Web Part .......................................................................................................... 16
Figure 2 WorkSite Web ASP.Net Controls Demo Page............................................................ 17
Figure 3 My Matters control on the Demo Page ....................................................................... 26
Figure 4 Solution Explorer view................................................................................................ 60
Figure 5 Add Web Reference dialog......................................................................................... 61
Figure 6 Web reference appears in Solution Explorer .............................................................. 62
Figure 7 Solution Explorer view.............................................................................................. 102
Figure 8 Add Web Reference dialog....................................................................................... 103
Figure 9 Web reference appears in Solution Explorer ............................................................ 104
Figures
8 WorkSite Web Application Integration Toolkit Developers Guide

WorkSite Web Application Integration Toolkit Developers Guide 9

Tables
Table 1 Notation conventions ............................................................................................... 12
Table 2 Description of moniker variables.............................................................................. 19
Table 3 Description of ShowFlags enumerators................................................................... 21
Table 4 Enumerator and its description................................................................................ 24
Table 5 Value of moniker variables....................................................................................... 29
Table 6 Numeric values for wswpShowEnums..................................................................... 30
Table 7 Numeric value for contentType enumerator............................................................. 30
Table 8 Value for contentType enumerator .......................................................................... 32
Table 9 Parameters to import documents............................................................................. 37
Table 10 Parameters to import an existing document as a new version ................................ 38
Table 11 Parameters to import a URL document ................................................................... 39
Table 12 Parameters to check in documents.......................................................................... 39
Table 13 Parameters to check out documents ....................................................................... 41
Table 14 Parameters to download documents ....................................................................... 42
Table 15 Parameters for sending documents via e-mail......................................................... 43
Table 16 Parameters to view document versions................................................................... 44
Table 17 Parameters to view related documents.................................................................... 45
Table 18 Parameter to view document history........................................................................ 45
Table 19 Parameters for viewing where a document is used................................................. 46
Table 20 Parameter for viewing a document in HTML format ................................................ 47
Table 21 Parameter for refiling a document............................................................................ 48
Table 22 Parameter for editing or viewing a documents properties....................................... 49
Table 23 Parameter for editing or viewing a folder's properties.............................................. 49
Table 24 Parameters for editing or viewing a Workspace's properties................................... 50
Table 25 Parameters for sending links to Workspaces via e-mail .......................................... 51
Table 26 Parameters passed to BrowseDlgEx.aspx............................................................... 54
Table 27 Required parameters for enhanced browse dialog callback.................................... 55
Table 28 Supported OutputMask bits for a moniker type........................................................ 81
Tables
10 WorkSite Web Application Integration Toolkit Developers Guide

WorkSite Web Application Integration Toolkit Developers Guide 11

About This Book


This guide includes information about the following topics:
ASP.Net controls and J avaScript objects that form the underlying structure of Web Parts.
Addressable URLs that can be used to access WorkSite Web dialogs from within another
Web application.
Enhanced browse dialogs that can leverage WorkSite Webs search functionality to locate
documents or workspaces, and that support multiple item selection.
Web service consumption within a .Net environment using the C#programming language.
Workspace generation for the WorkSite content management system from within other
applications.
Detailed instructions are provided for using these features.
Intended Audience
This guide includes information for developers, or other users requiring information about
customizing WorkSite Web.
About This Book
12 WorkSite Web Application Integration Toolkit Developers Guide

Notation Conventions
This manual uses the following notation conventions:
This guide also uses the following conventions:
The term Windows indicates any supported version of the Microsoft Windows operating
system, such as Windows

2000.
Table 1 Notation conventions
Convention Definition and Usage
Bold Text that appears in a GUI element such as, a menu item, button, or
element of a dialog box, and command names are shown in bold.
For example:
Click Edit File in the Button Bar.
Italic Book titles appear in italics.
Terms are italicized the first time they are introduced.
Important information may be italicized for emphasis.
Monospace Commands, command-line output, and file names are in
monospace type. For example:
The i wext at t r command-line tool allows you to set and look up
extended attributes on a file.
Monospaced
italic
Monospaced italics are used for command-line variables.For
example:
i wckr ol e role user
This means that you must replace role and user with your values.
Monospaced bold Monospaced bold represents information you enter in response to
system prompts. The character that appears before a line of user
input represents the command prompt, and should not be typed.
For example:
iwextattr -s project=proj1 //IWSERVER/default/main/dev/
WORKAREA/andre/products/index.html
Monospaced bold
italic
Monospaced bold italic text is used to indicate a variable in user
input. For example:
iwextattr -s project=projectname workareavpath
means that you must insert the values of projectname and
workareavpath when you enter this command.
[ ]
Square brackets surrounding a command-line argument mean that
the argument is optional.
|
Vertical bars separating command-line arguments mean that only
one of the arguments can be used.
Manual Organization
WorkSite Web Application Integration Toolkit Developers Guide 13

Directory paths use UNIX conventions. These conventions mandate using forward slashes (/
) in path names. (Windows systems use backward slashes.) The Windows convention is used
when referring to a Windows-specific directory. For example:
UNI X: docr oot / news/ f r ont . ht ml
Wi ndows: docr oot \ news\ f r ont . ht ml
Manual Organization
This manual is organized as follows:
Chapter 1, Using WorkSite Web ASP.Net and J ava Script Controls, describes the ASP.Net
controls and J avaScript objects that form the underlying structure of IWOV Web Parts. It
also discusses how to work with WorkSite Web elements in multiple environments.
Chapter 2, Addressable URLs for WorkSite Web Components Server, describes how to use
addressable URLs to import, check in, check out, view, and perform other tasks with
documents. It includes the base URL for these activities, parameters, accepted variables, and
other related information.
Chapter 3, Enhanced Browse Dialog, describes how to modify the browser to use WorkSite
Webs search functionality to locate documents or workspaces, and to support multiple item
selection. It includes coding instructions for making these modifications.
Chapter 4, WorkSite Web Service, describes how the Web service is consumed within a
.Net environment using the C#programming language. It also describes the methods in
WorkSite Web Service, including input messages, output messages, and parameters.
Chapter 5, Workspace Creation Web Service, describes how to generate workspaces for the
WorkSite content management system from within other applications. It explains how to use
this functionality, and it includes sample code.
Product Documentation
The following documents describe related products or functionality for the WorkSite Web:
WorkSite Web Components Server Installation Guide
WorkSite Web Online Help
WorkSite Web Application Integration Toolkit
WorkSite Web Customization Developer's Guide
WorkSite Web CSS Customization Guide
About This Book
14 WorkSite Web Application Integration Toolkit Developers Guide

WorkSite Web Connectors Developer's Guide


WorkSite Web for SharePoint User's Guide
WorkSite Protocol Handler for SharePoint
Documentation Updates
Additions and corrections to this document (when available) can be downloaded in PDF format
from the following Web site: https://customers.autonomy.com.
WorkSite Web Application Integration Toolkit Developers Guide 15

Chapter 1
Using WorkSite Web ASP.Net and
Java Script Controls
The WorkSite for SharePoint Users Guide explains how to bring WorkSite document
management functionality to Microsoft Office SharePoint by dropping IWOV Web Parts on a
SharePoint workspace. You can also add WorkSite Web controls such as My Matters or
searches to ASP.Net pages or any other type of portal or static HTML page. This chapter
describes the ASP.Net controls and J avaScript objects that form the underlying structure of
IWOV Web Parts and how to work with WorkSite Web elements in different environments. For
example, you may want to create ASP.Net pages and use them in conjunction with SharePoint as
target workspaces to display search results or zoomed views into WorkSite folders or
workspaces. With a higher level of programming skill, you can use the underlying J avaScript
objects to render any of the WorkSite controls such as My WorkSite or My Matters on a
custom Web portal or a static HTML page.
NOTE
To work with WorkSite Web elements in ASP.Net or a Web portal application other than
SharePoint, you must have the WorkSite Web Component Server installed on the machine on
which the portal application is running.
WorkSite Web Controls
An IWOV Web Part is a thin wrapper written in C#around an ASP.Net control. Every IWOV
Web Part has an underlying ASP.Net control.
The WorkSite Web ASP.Net controls with full WorkSite functionality can be added to any
ASP.Net page. This chapter will describe how to configure the WorkSite Web ASP.Net controls
by specifying the parameters.
Chapter 1: Using WorkSite Web ASP.Net and J ava Script Controls
16 WorkSite Web Application Integration Toolkit Developers Guide

The WorkSite Web ASP.Net control is, in turn, a thin wrapper around a J avaScript object. The
J avaScript object contains all the presentation logic and functions to render the WorkSite Web
control. In other words, the functionality of the ASP.Net control (and ultimately the IWOV Web
Part) is executed by calling functions and methods of the J avaScript objects. The J avaScript
objects themselves will render WorkSite Web elements directly on an HTML page, and you can
modify the view by calling methods of the objects. The IWOV Web Part is a thin wrapper that
references but does not contain the presentation logic. Figure 1 describes the levels of structure
underlying the IWOV Web Part.
Figure 1 IWOV Web Part
There are 14 IWOV Web Parts available in WorkSite for SharePoint. All IWOV Web Parts
represent different views of two base controls, the Quick Search control and the Web Part
control. My WorkSite is the default view of the Web Part control. This control can also be
configured to present My Matters or My Favorites, or a single folder or workspace or a saved
search. Figure 2 is a screen capture of the WorkSite Web ASP.Net Controls Demo Page that
contains a WorkSite Web ASP.Net controls for My WorkSite and a Quick Search control.
Using WorkSite Web ASP.Net Controls
WorkSite Web Application Integration Toolkit Developers Guide 17

Figure 2 WorkSite Web ASP.Net Controls Demo Page


We will use this demo page to illustrate how to work with WorkSite Web ASP.Net and
J avaScript controls. The WorkSite Web ASP.Net Controls Demo file is available for your
reference on the WorkSite Web installation CD. For installation information, see Using the
WorkSite Web ASP.Net Control Demo on page 36.
Using WorkSite Web ASP.Net Controls
A common practice when using WorkSite for SharePoint is to direct search results and the zoom
in view of folder contents to a "Goto.aspx" page or a "Result.aspx" page. An ASP.Net page with
WorkSite Web controls can be created within SharePoint of within another Web application.
Chapter 1: Using WorkSite Web ASP.Net and J ava Script Controls
18 WorkSite Web Application Integration Toolkit Developers Guide

The following sections describe how to add and configure the Quick Search and Web Part
controls on an ASP.Net page.
Adding Controls to an ASP.Net Page
You can add a WorkSite Web control to an ASP.Net page by following three steps:
1. Insert the code that references the DLL containing the WorkSite Web J avaScript objects.
2. Insert the code for the ASP.Net control.
3. Set or modify the parameters of the ASP.Net control to determine the features that appear
when the control is displayed.
The following sections walk you through the process of adding the ASP.Net WebPart control
and the QuickSearchPart control.
ASP.Net Control
Step 1: Reference the WebParts.dll
To drop a WorkSite Web control on an ASP.Net page, you must insert the following code into
the ASP.Net source code to reference the i Manage. Wor kSi t e. Web. WebPar t s. dl l . It is located
inside the Autonomy\WorkSite\Web\bin folder.
<%@Regi st er TagPr ef i x=" wor ksi t e" Namespace=" I nt er woven. Wor kSi t e. Web. WebPar t s"
Assembl y=" I nt er woven. Wor kSi t e. Web. WebPar t s" %>
NOTE
The i Manage. Wor kSi t e. Web. WebPar t s. dl l needs to be referenced only once.
The next step is to insert the code for the ASP.Net control.
Step 2: Insert the Code for the ASP.Net Control
The following code creates the WorkSite ASP.Net control. To view the generated code for the
J avaScript object, see WorkSiteWebPart on page 27. The default view of this control is My
WorkSite, as shown in Figure 2.
<wor ksi t e: WebCont r ol i d=" WebCont r ol " r unat ="ser ver " Vi r t ual Pat h=" / wor ksi t e"
Using WorkSite Web ASP.Net Controls
WorkSite Web Application Integration Toolkit Developers Guide 19

Moni ker Type=" Wor kAr ea"


Cust omDet ai l Page=" Tr ue"
Det ai l Page="Got o. aspx"
Sel ect i onMode=" None"
Cont ent Types=" Document , Wor kspace"
ShowFl ags=" Tr ee, Cont ent , Vi ewMenu, Act i onMenu, Act i onBar , Sear chType"
Cont r ol Hei ght =" 320"
Expl or er Wi dt h=" 240"
St r et ch=" Tr ue"
St yl e=" bor der : 1px sol i d #587BD7; " / >
Step 3: Modify the Controls Parameters
You can modify the Web Part control to display any of the WorkSite Web elements listed on the
left side of the WorkSite Web ASP.Net Controls Demo Page shown in Figure 2. For example,
you can configure the Web Part control to display My Matters or My Favorites. You can
display the tree or a search form in the left pane with toggle buttons in the toolbar. Menus,
Action Bar and View menu can be shown or hidden. If you choose not to include any of these
features, the toolbar will not display on the control.
The parameters of the WorkSite Web Part control are listed below:
id
The ID attribute must be unique within a page.
MonikerType
A variable value used with the NRTID of the WorkSite Web control configured to display
different WorkSite Web controls. Descriptions of the moniker variables are listed in the
following table.
Table 2 Description of moniker variables
Moniker Variable Description
CheckedOutList Calls the CheckedOut Documents control.
WorkList Calls the combined Document Worklist control.
RecentWorkspaces Calls the Matter Worklist control.
SubscriptionFolder Calls the My Matters control.
FavoritesFolder Calls the My Favorites control.
Session Calls the Session.
WorkArea Calls the WorkArea.
Chapter 1: Using WorkSite Web ASP.Net and J ava Script Controls
20 WorkSite Web Application Integration Toolkit Developers Guide

CustomDetailPage
Boolean. When true, the search results or the zoom in view of the folder are directed to a target
ASP.Net page.
DetailPage
The ASP.Net page where the search results or zoom in view of the folder will display.
ContentTypes
String value that determines what type of content will be displayed in the right pane of the
control.
Document
WorkSpace
Document, WorkSpace
DocumentSearchFolder Calls the Document Search control.
StartWorkspace Calls the Start WorkSpace control.
QueryString Looks for the moniker (which can be an NRTID) in
the query string in the URL.
Detail Looks for the moniker (which can be an NRTID) in
the query string in the URL.
Manage Calls the Manage control.
DocumentProperties Looks for the moniker (which can be a document
NRTID) in the query string in the URL.
Moniker Looks for the value of the moniker in the Moniker
parameter.
Table 2 Description of moniker variables
Moniker Variable Description
Using WorkSite Web ASP.Net Controls
WorkSite Web Application Integration Toolkit Developers Guide 21

ShowFlags
A set of enumerators control the items to be displayed inside the WorkSite Web control. Table 3
lists these enumerators.
ControlHeight
The default height of the control. The height parameter does not apply if only the left or the right
pane is present on the control. In that case, the control height will grow to accommodate the
content, with no internal scroll bars. When both panes are present on the control and the Stretch
parameter described below is true, the height is set to 100% of the height of the parent HTML
element. If St r et ch is false, this parameter sets the default height and a resize bar appears at the
bottom of the window. If the height is not set on the parent element, the WorkSite Web control
will not display properly.
Table 3 Description of ShowFlags enumerators
Flag
(enumerator)
Description
Tree Displays the tree in the left pane of the control.
Form Displays the search form in the left pane of the control
TreeForm Displays the tree in the left pane with a toggle button in the
toolbar to switch to the search form
FormTree Displays the search form in the left pane with a toggle button in
the toolbar to switch to the tree
Content Displays the content pane on the right
ViewMenu Displays the View menu button on the toolbar
ActionBar Displays the Action menu button on the toolbar for the object
selected in the tree
ActionMenu Displays the Action menu for nodes in the tree
SearchType Displays the Search Type drop-down menu
Preview Displays the preview pane inside the content pane for the
documents
ToggleTF Displays the a button at the top left corner of the toolbar to
toggle between Tree and Form
LeftSide Displays the left pane
RightSide Displays the right pane
Toolbar Displays the toolbar
Chapter 1: Using WorkSite Web ASP.Net and J ava Script Controls
22 WorkSite Web Application Integration Toolkit Developers Guide

ExplorerWidth
The default width of the left pane of the control, or the entire control if there is only one pane.
When there are two panes, a resize bar appears on the control and the user can modify the
Expl or er Wi dt h.
Stretch
Boolean. This parameter affects the pi xel Hei ght of the control. It does not apply when only the
left or right pane is present on the control. When both panes are present on the control and the
Stretch parameter described below is true, the height is set to 100% of the height of the parent
HTML element. If Stretch is false, this parameter sets the default height and a resize bar appears
at the bottom of the window. If the parent element does not have a size parameter, the WorkSite
Web control will not display properly.
Style
Used to enter additional CSS style attributes.
Quick Search Control
Step 1: Reference the WebParts.dll
NOTE
If you have already added a WorkSite Web ASP.Net control to your page, you may skip this
step.
To drop a WorkSite Web control on an ASP.Net page, you must insert the following code into
the ASP.Net source code to reference the iManage.WorkSite.Web.WebParts.dll. It is located in
the WorkSite Web installation directory: worksite/Web/bin/
i Manage. Wor kSi t e. Web. WebPar t s. dl l .
<%@Regi st er TagPr ef i x=" wor ksi t e" Namespace=" I nt er woven. Wor kSi t e. Web. WebPar t s"
Assembl y=" I nt er woven. Wor kSi t e. Web. WebPar t s" %>
The next step is to insert the code for the ASP.Net control.
Using WorkSite Web ASP.Net Controls
WorkSite Web Application Integration Toolkit Developers Guide 23

Step 2: Insert the Code for the Quick Search Control


The following code creates the WorkSite Web Quick Search control. It uses the id attribute to
automatically call the J avaScript object and its functions.
<wor ksi t e: Qui ckSear chCont r ol i d=" Qui ckSear chCont r ol " r unat =" ser ver "
Vi r t ual Pat h=" / wor ksi t e"
Cust omDet ai l Page=" Tr ue"
Det ai l Page="Sear ch. aspx"
ShowObj ect Type=" Tr ue"
Obj ect Type="i mTypeDocument Sear chFol der "
Cont ent Types=" Document , Wor kspace" / >
Step 3: Modify the Controls Parameters
Configure the Quick Search control by setting the parameters. For example, you can include a
drop-down selection menu on the Quick Search control that lets the user choose a document
search or a workspace search, or you can display the Advanced search form instead of the Basic
form.
The parameters of the WorkSite Web Quick Search Control are listed below.
id
The ID attribute must be unique within a page.
CustomDetailPage
Boolean. When true, the search results are directed to a target ASP.Net page.
DetailPage
String. The ASP.Net page where the search results will display.
Style
Used to enter style elements such as borders.
ShowObjectType
Boolean. When true, the Quick Search control will display a drop-down menu of objects to be
searched (documents or workspaces). When false, no drop-down box appears.
Chapter 1: Using WorkSite Web ASP.Net and J ava Script Controls
24 WorkSite Web Application Integration Toolkit Developers Guide

ObjectType
String values that describe the type of search:
i mDocument Sear chFol der
i mWor kSpaceSear chFol der
ContentTypes
Enumerator that determines whether a drop-down box appears on the control. The
ShowObj ect Type parameter described above must be true for the drop-down box to appear.
Using WorkSite Web JavaScript Objects
You can add WorkSite Web controls to any HTML page by dropping client-side J avaScript
objects into the code. The following sections describe how to create the Demo Page shown in
Figure 2 using J avaScript objects.
Load the J avaScript Files from the WorkSite Web Directory
The following code loads all the J avaScript files. If you are using ASP.Net controls, the
J avaScript files are loaded automatically. The files only need to be loaded once, even if you are
adding multiple WorkSite Web objects. The filenames are in bold type for your reference.
CAUTION
Do not modify the code that loads the J avaScript files.
<scr i pt l anguage=" j avascr i pt " _
sr c=" / wor ksi t e/ i ncl udes/ Utility.js" ></ scr i pt >
<scr i pt l anguage=" j avascr i pt " _
Table 4 Enumerator and its description
Enumerator Description
Document Defaults to document search.
WorkSpace Defaults to workspace search.
Document, WorkSpace If ShowObj ect Type is True, a drop-down menu appears
with Document and WorkSpace search options.
Using WorkSite Web J avaScript Objects
WorkSite Web Application Integration Toolkit Developers Guide 25

sr c=" / wor ksi t e/ i ncl udes/ Common.js" ></ scr i pt >


<scr i pt l anguage=" j avascr i pt " _
sr c=" / wor ksi t e/ i ncl udes/ locClient.js" ></ scr i pt >
<scr i pt l anguage=" j avascr i pt " _
sr c=" / wor ksi t e/ scr i pt s/ WebPartContext.aspx" ></ scr i pt >
<scr i pt l anguage=" j avascr i pt " _
sr c=" / wor ksi t e/ i ncl udes/ filetransfer.js" ></ scr i pt >
<scr i pt l anguage=" j avascr i pt " _
sr c=" / wor ksi t e/ i ncl udes/ menu.js" ></ scr i pt >
<scr i pt l anguage=" j avascr i pt " _
sr c=" / wor ksi t e/ i ncl udes/ ClientMenus.js" ></ scr i pt >
<scr i pt l anguage=" j avascr i pt " _
sr c=" / wor ksi t e/ i ncl udes/ tab.js" ></ scr i pt >
<scr i pt l anguage=" j avascr i pt " _
sr c=" / wor ksi t e/ i ncl udes/ tree.js" ></ scr i pt >
<scr i pt l anguage=" j avascr i pt " _
sr c=" / wor ksi t e/ i ncl udes/ Profile.js" ></ scr i pt >
<scr i pt l anguage=" j avascr i pt " _
sr c=" / wor ksi t e/ i ncl udes/ WebPart.js" ></ scr i pt >
<l i nk r el ="St yl esheet " hr ef =" / wor ksi t e/ i ncl udes/ i wpl . css" ></ l i nk>
<scr i pt l anguage=" j avascr i pt " >wi ndow. wor ksi t e && _
Wor kSi t eWebPar t Set up( ) ; </ scr i pt >
<l i nk r el ="St yl esheet " hr ef =" / wor ksi t e/ i ncl udes/ WebPar t . css" ></ l i nk>
Initialization Code
Enter the following initialization code:
/ / Common I ni t i al i zat i on code
<scr i pt l anguage=" j avascr i pt " >
/ / t o do i ni t i al i zat i on of WebPar t s
wi ndow. wor ksi t e && Wor kSi t eWebPar t Set up( ) ;
</ scr i pt >
Create the Links on the Demo Page
NOTE
This step is for demonstration purposes only.
Chapter 1: Using WorkSite Web ASP.Net and J ava Script Controls
26 WorkSite Web Application Integration Toolkit Developers Guide

The main Web Part control renders My WorkSite by default, but it contains the building blocks
of the other WorkSite Web controls. When clicked, a link on the left side of the WorkSite Web
ASP.Net Controls Demo Page configure the corresponding APS.Net control within the My
Matters window. For example, Figure 3 shows the control after the My Matters link has been
clicked.
Figure 3 My Matters control on the Demo Page
Create a table to position the link list. The following code creates the links. The HREF calls the
J avaScript function "openMyWorkSite( )", "openCheckedOutDocuments( )", etc. These
functions are described in detail in Step 6.
<t d>
<ul >
<l i ><a hr ef =" j avascr i pt : openMyWor kSi t e( ) " >My Wor kSi t e</ a></ l i >
<l i ><a hr ef =" j avascr i pt : openCheckedOut Document s( ) " >Checked- out
Document s</ a></ l i >
<l i ><a hr ef =" j avascr i pt : openDocument Wor kl i st ( ) " >Document Wor kl i st </ a></
l i >
Using WorkSite Web J avaScript Objects
WorkSite Web Application Integration Toolkit Developers Guide 27

<l i ><a hr ef =" j avascr i pt : openMat t er Wor kl i st ( ) " >Mat t er Wor kl i st </ a></ l i >
<l i ><a hr ef =" j avascr i pt : openMyMat t er s( ) " >My Mat t er s</ a></ l i >
<l i ><a hr ef =" j avascr i pt : openMyFavor i t es( ) " >My Favor i t es</ a></ l i >
<l i ><a hr ef =" j avascr i pt : openExpl or er ( ) " >Expl or er </ a></ l i >
<l i ><a hr ef =" j avascr i pt : openWor kspace( ) " >Wor kspace</ a></ l i >
<l i ><a hr ef =" j avascr i pt : openSear ch( ) " >Sear ch</ a></ l i >
<l i ><a hr ef =" j avascr i pt : openSear chExpl or er ( ) " >Wor kspace Sear ch I n Tr ee</
a></ l i >
</ ul >
</ t d>
Enter the Code for the WorkSite Web Controls
In this example, two controls are added to the page by entering the code for the J avaScript
objects.
NOTE
This is the code that is generated when you add an ASP.Net control to a page.
WorkSiteWebPart
The following code calls the J avaScript object corresponding to the base WorkSite WebPart
control (in this case, My WorkSite).
<scr i pt >
i f ( wi ndow. wor ksi t e )
{
/ / Cr eat e t he Wor ksi t e WebPar t Obj ect
Wor kSi t eWebPar t ( {i d: ' WebCont r ol ' ,
pi xel Wi dt h: 240,
pi xel Hei ght : 320,
cust omDet ai l Page: t r ue,
det ai l Page: ' Got o. aspx' ,
st yl e: ' bor der : 1px sol i d #587BD7; ' ,
st r et ch: t r ue
}) . wr i t e( ) ;
/ / Ref r esh t he Wor ksi t e WebPar t wi t h appr opr i at e par amet er s. I n t hi s
/ / exampl e, l oad Mat t er wor kl i st .
onl oadAdvi se( ' di spat ch( \ ' WebCont r ol \ ' , \ ' r ef r esh\ ' , {qs: ( \ ' ?nr t i d=\ ' _
+ Moni ker Wor kAr ea) , showFl ags: 500, sel ect i onMode: 0, cont ent Type: 8320_
}) ' ) ;
}
Chapter 1: Using WorkSite Web ASP.Net and J ava Script Controls
28 WorkSite Web Application Integration Toolkit Developers Guide

</ scr i pt >


Modify the Controls Parameters
You can modify the parameters that are passed to the constructor WorkSiteWebPart:
id
The ID attribute must be unique within a page.
pixelWidth
The default width of the left pane of the control.
pixelHeight
The default height of the control. The height parameter does not apply if only the left or the right
pane is present on the control. In that case, the control height will grow to accommodate the
content, with no internal scroll bars. When both panes are present on the control and the Stretch
parameter described below is true, the height is set to 100% of the height of the parent HTML
element. If Stretch is false, this parameter sets the default height and a resize bar appears at the
bottom of the window. If the parent element does not have a size parameter, the WorkSite Web
control will not display properly.
customDetailPage
Boolean. When true, the search results or zoom in view of the folder are directed to a target
ASP.Net page.
detailPage
The ASP.Net page where the search results will display.
style
Used to enter style elements such as borders. You can enter style elements manually, but you
cannot reference CSS stylesheets with this property.
Using WorkSite Web J avaScript Objects
WorkSite Web Application Integration Toolkit Developers Guide 29

stretch
Boolean. This parameter affects the pi xel Hei ght of the control. It does not apply when only the
left or right pane is present on the control. When both panes are present on the control and the
Stretch parameter described below is true, the height is set to 100% of the height of the parent
HTML element. If Stretch is false, this parameter sets the default height and a resize bar appears
at the bottom of the window. If the parent element does not have a size parameter, the WorkSite
Web control will not display properly.
The constructor executes the wr i t e( ) method. When the page loads, the dispatch method
automatically calls the r ef r esh( ) method. This ensures that r ef r esh( ) executes after the
page loads.
Modify the Parameters Passed to the Controls Refresh Method
The r ef r esh( ) method retrieves data based on the following parameters:
qs
This parameter specifies the target, for example: qs: '?nrtid=' + MonikerRecentPages. If there
is no value for the qs parameter, My WorkSite is the default. Values for the moniker variable are
listed in the following table:
showFlags
A combination of wswpShowEnumvalues that control the view of the WorkSite Web control. They
are turned on by listing the wswpShowEnums that you want to appear. The wswpShowEnums can be
listed in any order. You can substitute a numeric value for the wswpShowEnum. In this example, it
is "showFl ags: 497".
Table 5 Value of moniker variables
Moniker Variable Value
MonikerCheckedOutList "_checkedoutlist"
MonikerWorkList "_worklist"
MonikerRecentWorkspaces "_recentpages"
MonikerSubscriptionFolder "_subscriptionfolder"
MonikerFavoritesFolder "_favoritesfolder"
MonikerSession "_session"
MonikerWorkArea "_workarea"
MonikerDocumentSearchFolder "_documentsearchfolder"
MonikerStartWorkspace "_start"
Chapter 1: Using WorkSite Web ASP.Net and J ava Script Controls
30 WorkSite Web Application Integration Toolkit Developers Guide

NOTE
The wswpShowEnums correspond to the view options that appear on the IWOV Web Part
Properties dialog in SharePoint.
The wswpShowEnums and their numeric values are shown in the following table:
contentType
Enumerator that determines what type of content will be displayed in the right pane of the
control. Use the numeric value of the enumerator.
WorkSiteQuickSearchPart
Insert the following code to add the WorkSite Quick Search control:
<scr i pt >
Table 6 Numeric values for wswpShowEnums
wswpShowEnum Num. Value Description
Tree 1 Displays the tree in the left pane of the control.
Form 2 Displays the search form in the left pane
TreeForm 4 Displays the tree in the left pane with a toggle
button in the toolbar to switch to the search form
FormTree 8 Displays the search form in the left pane with a
toggle button in the toolbar to switch to the tree
Content 16 Displays the content pane
ViewMenu 32 Displays the View menu button on the toolbar
ActionBar 64 Displays the Action menu buttons on the toolbar
for the node that is selected in the tree
ActionMenu 128 Displays the Action menu for nodes in the tree
SearchType 256 Displays the Search Type drop-down menu on the
Quick Search control
Table 7 Numeric value for contentType enumerator
Enumerator Num. Value
Document 8192
WorkSpace 128
Document, WorkSpace 8320
Using WorkSite Web J avaScript Objects
WorkSite Web Application Integration Toolkit Developers Guide 31

i f ( wi ndow. wor ksi t e )


{
/ / Cr eat e t he Qui ck Sear ch Wor ksi t e WebPar t Obj ect
Wor kSi t eQui ckSear chPar t ( {i d: ' Qui ckSear chCont r ol ' , _
cust omDet ai l Page: t r ue, det ai l Page: ' Sear ch. aspx' , st yl e: ' ' , _
showObj ect Type: t r ue}) . wr i t e( ) ;
/ / Ref r esh t he Wor ksi t e WebPar t wi t h appr opr i at e par amet er s.
/ / I n t hi s exampl e, l oad t he user s document sear ch pr of i l e f or m.
onl oadAdvi se( ' di spat ch( \ ' Qui ckSear chCont r ol \ ' , \ ' r ef r esh\ ' , _
{showFor m: f al se, obj ect Type: \ ' i mTypeDocument Sear chFol der \ ' , _
cont ent Type: 8320 }) ' ) ;
}
</ scr i pt >
Modify the Controls Parameters
The parameters that are passed to the Wor kSi t eQui ckSear chPar t constructor are:
id
The ID attribute must be unique within a page.
customDetailPage
Boolean. When true, the search results are directed to a target ASP.Net page.
detailPage
The ASP.Net page where the search results will display.
style
Used to enter style elements such as borders. You can enter style elements manually, but you
cannot reference CSS stylesheets with this property.
showObjectType
Boolean. When true, the Quick Search control will display a drop-down menu of objects to be
searched (documents, workspaces, or both). When false, no drop-down box appears.
The constructor executes the wr i t e( ) method. When the page loads, the Dispatch method
automatically calls the Refresh method. This ensures that Refresh executes after the page loads.
Chapter 1: Using WorkSite Web ASP.Net and J ava Script Controls
32 WorkSite Web Application Integration Toolkit Developers Guide

Modify the Parameters Passed to the Controls Refresh Method


The Refresh method retrieves data based on the following parameters:
showForm
Boolean. When true, the search form rather than the tree displays in the left pane of the control.
When false, the tree displays.
objectType
String value that describes the type of search:
i mTypeDocument Sear chFol der
i mTypeWor kSpaceSear chFol der
contentType
Enumerator that determines whether a drop-down box appears on the control. The
ShowObj ect Type parameter described above must be true for the drop-down box to appear. The
enumerator and the corresponding numeric value can be used interchangeably.
Open the Controls That Are Called by the Links
The following code corresponds to the links listed on the Demo Page. Each link calls a different
configuration of the Wor kSi t eWebPar t J avaScript object. It is included to illustrate how to
modify the My WorkSite control to create the various WorkSite Web Parts that have been
packaged for use in SharePoint. Note the difference in the showFl ags parameters when different
WorkSite controls are opened in the window. You can modify the showFl ags parameter to
customize the view of the control.
Table 8 Value for contentType enumerator
Enumerator Num. Value Description
Document 8192 Defaults to document search. No
drop-down menu appears.
WorkSpace 128 Defaults to workspace search. No
drop-down menu appears.
Document, WorkSpace 8320 Drop-down menu appears. User can select
Documents or WorkSpaces.
Using WorkSite Web J avaScript Objects
WorkSite Web Application Integration Toolkit Developers Guide 33

My WorkSite
The following code renders the WorkSiteWebPart as My WorkSite.
<scr i pt >
f unct i on openMyWor kSi t e( )
{
r ef r esh(
{
qs: ' ?' ,
showFl ags: wswpShowEnum. Tr ee | wswpShowEnum. Cont ent |
wswpShowEnum. Vi ewMenu | wswpShowEnum. Act i onMenu
}) ;
}
Checked Out Documents
The following code renders the WorkSiteWebPart as Checked Out Documents.
f unct i on openCheckedOut Document s( )
{
r ef r esh(
{
qs: ' ?nr t i d=' + Moni ker CheckedOut Li st ,
showFl ags: wswpShowEnum. Cont ent | wswpShowEnum. Vi ewMenu |
wswpShowEnum. Act i onBar
}) ;
}
Document Worklist
The following code renders the WorkSiteWebPart as Document Worklist.
f unct i on openDocument Wor kl i st ( )
{
r ef r esh(
{
qs: ' ?nr t i d=' + Moni ker Wor kLi st ,
showFl ags: wswpShowEnum. Cont ent | wswpShowEnum. Vi ewMenu |
wswpShowEnum. Act i onBar
}) ;
}
Matter Worklist
The following code renders the WorkSiteWebPart as Matter Worklist.
f unct i on openMat t er Wor kl i st ( )
Chapter 1: Using WorkSite Web ASP.Net and J ava Script Controls
34 WorkSite Web Application Integration Toolkit Developers Guide

{
r ef r esh(
{
qs: ' ?nr t i d=' + Moni ker Recent Wor kspaces,
showFl ags: wswpShowEnum. Tr ee | wswpShowEnum. Act i onMenu
}) ;
}
My Matters
The following code renders the WorkSiteWebPart as My Matters.
f unct i on openMyMat t er s( )
{
r ef r esh(
{
qs: ' ?nr t i d=' + Moni ker Subscr i pt i onFol der ,
showFl ags: wswpShowEnum. Tr ee | wswpShowEnum. Act i onMenu
}) ;
}
My Favorites
The following code renders the WorkSiteWebPart as My Favorites.
f unct i on openMyFavor i t es( )
{
r ef r esh(
{
qs: ' ?nr t i d=' + Moni ker Favor i t esFol der ,
showFl ags: wswpShowEnum. Tr ee | wswpShowEnum. Cont ent |
wswpShowEnum. Vi ewMenu | wswpShowEnum. Act i onMenu
}) ;
}
WorkSite Explorer
The following code renders the WorkSiteWebPart as WorkSite Explorer.
f unct i on openExpl or er ( )
{
r ef r esh(
{
qs: ' ?nr t i d=' + Moni ker Sessi on,
showFl ags: wswpShowEnum. Tr ee | wswpShowEnum. Cont ent |
wswpShowEnum. Vi ewMenu | wswpShowEnum. Act i onMenu
}) ;
Using WorkSite Web J avaScript Objects
WorkSite Web Application Integration Toolkit Developers Guide 35

}
WorkSpace or Folder
The following code renders the WorkSiteWebPart as WorkSpace or Folder.
f unct i on openWor kspace( )
{
r ef r esh(
{
qs:
' ?nr t i d=! nr t dms%3A0%3A! sessi on%3Awor kdemo%3A! dat abase%3AWDI MAN80%3A! page%3A43198
%3A' ,
showFl ags: wswpShowEnum. Tr ee | wswpShowEnum. Cont ent |
wswpShowEnum. Vi ewMenu | wswpShowEnum. Act i onMenu
}) ;
}
Search
The following code renders the WorkSiteWebPart as Quick Search, Document Search, or
WorkSpace Search.
f unct i on openSear ch( )
{
r ef r esh(
{
qs: ' ?' ,
showFl ags: wswpShowEnum. For mTr ee | wswpShowEnum. Cont ent |
wswpShowEnum. Vi ewMenu | wswpShowEnum. Act i onBar | wswpShowEnum. Act i onMenu |
wswpShowEnum. Sear chType,
sel ect i onMode: sel ect i onModeEnum. Mul t i Sel ect
}) ;
}
Refresh Function
Each time the refresh( ) method of a J avaScript object is called, the following helper function is
invoked:
f unct i on r ef r esh( dat a)
{
di spat ch( ' WebCont r ol ' , ' r ef r esh' , dat a) ;
}
wher e
' WebCont r ol ' = t he i d of t he cont r ol .
Chapter 1: Using WorkSite Web ASP.Net and J ava Script Controls
36 WorkSite Web Application Integration Toolkit Developers Guide

' r ef r esh' = t he met hod


' dat a' = t he set of par amet er s t hat i s passed t o t he r ef r esh( ) met hod
Using the WorkSite Web ASP.Net Control
Demo
The name of the WorkSite Web ASP.Net Control project file is
WorkSiteASP.NetControlsDemo.zip.
NOTE
To use this sample you must have WorkDocs or WorkSite Web 8.5 installed.
To install the WorkSite ASP.Net Control Demo:
1. Locate the WorkSiteASP.NetDemo.zip file located on the WorkSite Web installation CD.
2. Extract the WorkSiteASP.NetDemo.zip file to a folder on your local machine.
3. Create a virtual directory called "WorksiteAspNetDemo" and point it to this folder.
4. From the Browse dialog, type http://localhost/WorksiteAspNetDemo/Webcontrol.aspx to
launch the Demo.
The following files are included in the demo zip file:
Webcontrol.aspx This file contains both WebControl and Quick Search Control demo
Goto.aspx This file contains WebControl. This is used as "Zoomed in" Page when you
double click on any folder or workspace in Webcontrol.aspx
Search.aspx Shows the search form and result. This page is also used as target page
when you perform Quick Search in Webcontrol.aspx
NOTE
If you have WorkSite Web installed under a virtual directory other than the
default /worksite, you must open all the listed ASP.Net files and replace the VirtualPath="/
worksite with the appropriate value. The link "Workspace" has
a hard-coded workspace moniker. You will need to replace this with the appropriate moniker
from your system.
WorkSite Web Application Integration Toolkit Developers Guide 37

Chapter 2
Addressable URLs for WorkSite
Web Components Server
Overview
Addressable URLs are used to access WorkSite Web dialogs from within another Web
application. WorkSite Web dialogs have been carefully designed to be integrated with third
party applications. All dialogs accept query string parameters.
To streamline the user experience, you should enable auto trusted login on the WorkSite Web
Components Server. This eliminates the WorkSite Web login prompt. To set up auto trusted
login, consult the WorkSite Web Components Server Installation and Configuration Manual.
Importing Documents
Base URL:
ht t p: / / l ocal host / wor ksi t e81/ scr i pt s/ CheckI n. aspx
Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
CheckI n. aspx?dest =! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! f ol der : or di n
ar y, 45789: &r edi r ect =ht t p: / / www. yahoo. com
Table 9 Parameters to import documents
Parameter Description Acceptable Value(s)
Additional
Information
dest The IWOV moniker of the
container object in which the
document(s) will be saved
nrtdms:0:!session:test-server:!data
base:test-db:!folder:ordinary,4578
9
The container must be
for document folder or
a database
Chapter 2: Addressable URLs for WorkSite Web Components Server
38 WorkSite Web Application Integration Toolkit Developers Guide

Additional Comments:
This callback function should only be used for importing documents that are not URL
documents.
The new moniker(s) for the imported document(s) can be retrieved by writing a custom callback
function in your HTML that the import dialog will call. See Using the WorkSite Web Dialog
Callback on page 51.
Importing an Existing Document as a New Version
Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ CheckI n. aspx
Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
CheckI n. aspx?i mpor t =ver si on&nr t i d=! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est -
db: ! document : 229713, 5: &dest =! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! f o
l der : or di nar y, 45789: &r edi r ect =ht t p: / / www. yahoo. com
Table 10 Parameters to import an existing document as a new version
Parameter Description Acceptable Value(s)
Additional
Information
dest The IWOV moniker for the
container object into which the
document is imported
!nrtdms:0:!session:test-server:!dat
abase:test-db:!folder:ordinary,4578
9:
The container should
be a document folder
or database
nrtid The IWOV moniker for the
object on which the operation
is being performed
nrtdms:0:!session:test-server:!data
base:test-db:!document:225387,1:
import Indicates a new version should
be created for the moniker
passed in the nrtid parameter
"version This value is
case-sensitive
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Table 9 Parameters to import documents
Parameter Description Acceptable Value(s)
Additional
Information
Overview
WorkSite Web Application Integration Toolkit Developers Guide 39

Importing a URL Document


Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ CheckI n. aspx
Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
CheckI n. aspx?i mpor t =ur l &dest =! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! f
ol der : or di nar y, 45789: &r edi r ect =ht t p: / / www. yahoo. com
Table 11 Parameters to import a URL document
Parameter Description Acceptable Value(s)
Additional
Information
dest The IWOV moniker for the
container object into which the
document is imported
!nrtdms:0:!session:test-server:!dat
abase:test-db:!folder:ordinary,4578
9:
The container should
be a document folder
or database only
import Indicates that a URL is being
imported
url This value is
case-sensitive
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Checking In Documents
Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ CheckI n. aspx
Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
CheckI n. aspx?nr t i d=! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! document : 22
5386, 3: ^! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! document : 225387, 2: &des
t =! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! f ol der : or di nar y, 45789: &r edi r
ect =ht t p: / / www. yahoo. com
Table 12 Parameters to check in documents
Parameter Description Acceptable Value(s)
Additional
Information
dest The IWOV moniker for the
container object into which the
document is saved
!nrtdms:0:!session:test-server:!dat
abase:test-db:!folder:ordinary,4578
9:
The container should
be a document folder
or database only
Chapter 2: Addressable URLs for WorkSite Web Components Server
40 WorkSite Web Application Integration Toolkit Developers Guide

Additional Comments:
The document(s) must be checked out.
Checking Out Documents
Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ Checkout . aspx
Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
Checkout . aspx?nr t i d=! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! document : 2
25386, 3: ^! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! document : 225387, 2: ^! n
nrtid The IWOV moniker(s) for the
object(s) on which the
operation is being performed
For a single operation:
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
For multiple operations:
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
^
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225364,2:
^
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:2397,1:
For multi-operation,
monikers must be
separated using
constant
kMultiOpSeparator
(character ^) as
defined in includes/
common.js
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Table 12 Parameters to check in documents
Parameter Description Acceptable Value(s)
Additional
Information
Overview
WorkSite Web Application Integration Toolkit Developers Guide 41

r t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! document : 230119, 2: ^! nr t dms: 0: ! se
ssi on: t est - ser ver : ! dat abase: t est - db: ! document : 230144, 1: &r edi r ect =ht t p: / /
www. yahoo. com
Table 13 Parameters to check out documents
Parameter Description Acceptable Value(s)
Additional
Information
nrtid The IWOV moniker(s) for the
object(s) on which the
operation is being performed
For a single operation:
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
For multiple operations:
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
^
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225364,2:
^
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:2397,1:
For multi-operation,
monikers must be
separated using
constant
kMultiOpSeparator
(character ^)
as defined in includes/
common.js
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Downloading Documents
Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ Expor t . aspx
Chapter 2: Addressable URLs for WorkSite Web Components Server
42 WorkSite Web Application Integration Toolkit Developers Guide

Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
Expor t . aspx?nr t i d=! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! document : 230
147, 1: ^! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! document : 230146, 1: &r edi
r ect =ht t p: / / www. yahoo. com
Table 14 Parameters to download documents
Parameter Description Acceptable Value(s)
Additional
Information
nrtid The IWOV moniker(s) for the
object(s) on which the
operation is being performed
For a single operation:
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
For multiple operations:
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
^
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225364,2:
^
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:2397,1:
For multi-operation,
monikers must be
separated using
constant
kMultiOpSeparator
(character ^)
as defined in includes/
common.js
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Sending Documents via E-mail
Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ DocMai l To. aspx
Overview
WorkSite Web Application Integration Toolkit Developers Guide 43

Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
DocMai l t o. aspx?l at est =0&i sLi nk=1&nr t i d=! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase:
t est - db: ! document : 229713, 5: &subj ect =Sendi ngDocument &r edi r ect =ht t p: / /
www. yahoo. com
Table 15 Parameters for sending documents via e-mail
Parameter Description Acceptable Value(s)
Additional
Information
nrtid The IWOV moniker(s) for the
object(s) on which the
operation is being performed
For a single operation
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
For multiple operations
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
^
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225364,2:
^
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:2397,1:
Additional Info: For
multi-operation,
monikers must be
separated using
constant
kMultiOpSeparator
(character ^)
as defined in includes/
common.js
latest Indicates the document version
to be used when constructing
the URL that will be sent in the
message. This only applies
when the parameter isLink=1.
0 =Send a link to the version
specified by the moniker
1 =Send a link to the latest version
of the document specified by the
moniker
2 =Allow the user to select the
version when viewing the link
For multi-operation,
this value applies to all
documents specified
in the nrtid parameter
isLink Indicates whether the
document(s) should be sent as
attachment(s) to the message
or as URL/NRL link(s)
0 =Documents are attached to
message (latest parameter is
ignored)
1 =URL links created in the body
of the message and NRL links sent
as attachments
For multi-operation,
this value applies to all
documents specified
in the nrtid parameter
subject The subject line of the email
message
Any string value
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Additional Comments:
WorkSite Web must connect to an SMTP server.
Chapter 2: Addressable URLs for WorkSite Web Components Server
44 WorkSite Web Application Integration Toolkit Developers Guide

Viewing Document Versions


Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ Home. aspx
Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
Home. aspx?page=_r esour ce&docnr t i d=! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est -
db: ! document : 229713, 5: &doct mpl t =ver si on- t abl e&showpopup=1&r edi r ect =ht t p: / /
www. yahoo. com
Table 16 Parameters to view document versions
Parameter Description Acceptable Value(s)
Additional
Information
page _resource This value should be
constant
docnrtid The IWOV moniker for the
object on which the operation
is being performed
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
doctmplt Indicates that versions are
being requested for the
document specified by the
docnrtid parameter
version-table This value is
case-sensitive
showpopup 1 This value should be
constant
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Viewing Related Documents
Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ Home. aspx
Overview
WorkSite Web Application Integration Toolkit Developers Guide 45

Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
Home. aspx?page=_r esour ce&docnr t i d=! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est -
db: ! document : 229713, 5: &doct mpl t =r el at ed- t abl e&showpopup=1&r edi r ect =ht t p: / /
www. yahoo. com
Table 17 Parameters to view related documents
Parameter Description Acceptable Value(s)
Additional
Information
page _resource This value should be
constant
docnrtid The IWOV moniker for the
object on which the operation
is being performed
nrtdms:0:!session:test-server:!data
base:test-db:!document:225387,1:
doctmplt Indicates that related
documents are being requested
for the document specified by
the docnrtid parameter
related-table This value is
case-sensitive
showpopup 1 This value should be
constant
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Viewing Document History
Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ Home. aspx
Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
Home. aspx?page=_r esour ce&docnr t i d=! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est -
db: ! document : 229713, 5: &doct mpl t =hi st or y- t abl e&showpopup=1&r edi r ect =ht t p: / /
www. yahoo. com
Table 18 Parameter to view document history
Parameter Description Acceptable Value(s)
Additional
Information
page _resource This value should be
constant
Chapter 2: Addressable URLs for WorkSite Web Components Server
46 WorkSite Web Application Integration Toolkit Developers Guide

Viewing Where a Document Is Used


Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ Home. aspx
Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
Home. aspx?page=_r esour ce&docnr t i d=! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est -
db: ! document : 229713, 5: &doct mpl t =wher e- used- t abl e&showpopup=1&r edi r ect =ht t p: / /
www. yahoo. com
nrtid The IWOV moniker for the
object on which the operation
is being performed
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
doctmplt Indicates that the request is for
document history for the
document specified by the
docnrtid parameter
history-table This value is
case-sensitive
showpopup 1 This value should be
constant
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Table 19 Parameters for viewing where a document is used
Parameter Description Acceptable Value(s)
Additional
Information
page _resource This value should be
constant
nrtid The IWOV moniker for the
object on which the operation
is being performed
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
doctmplt Indicates that the request is for
folders where the document is
referenced
where-used-table This value is
case-sensitive
showpopup 1 This value should be
constant
Table 18 Parameter to view document history
Parameter Description Acceptable Value(s)
Additional
Information
Overview
WorkSite Web Application Integration Toolkit Developers Guide 47

Viewing a Document in HTML Format


Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ Vi ewDoc. aspx
Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
Vi ewDoc. aspx?nr t i d=! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! document : 22
9713, 5: &command=ok&i sHTML=1&r edi r ect =ht t p: / / www. yahoo. com
Table 20 Parameter for viewing a document in HTML format
Parameter Description Acceptable Value(s)
Additional
Information
nrtid The IWOV moniker for the
object on which the operation
is being performed
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
command ok This value should be
constant. It is also
case-sensitive.
ishtml 1 This value should be
constant
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Refiling a Document
Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ Ref i l eEdi t . aspx
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Table 19 Parameters for viewing where a document is used
Parameter Description Acceptable Value(s)
Additional
Information
Chapter 2: Addressable URLs for WorkSite Web Components Server
48 WorkSite Web Application Integration Toolkit Developers Guide

Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
Ref i l eEdi t . aspx?nr t i d=! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! document
: 229713, 5: &par ent =! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! f ol der : or di n
ar y, 45789: &r edi r ect =ht t p: / / www. yahoo. com
Table 21 Parameter for refiling a document
Parameter Description Acceptable Value(s)
Additional
Information
nrtid The IWOV moniker for the
object on which the operation
is being performed
For a single operation:
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
For multiple operations:
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
^
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225364,2:
^
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:2397,1:
For multi-operation,
monikers must be
separated using
constant
kMultiOpSeparator
(character ^)
as defined in includes/
common.js
parent The IWOV moniker for the
document folder from which
the profile values are retrieved
!nrtdms:0:!session:test-server:!dat
abase:test-db:!folder:ordinary,4578
9:
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Editing or Viewing a Documents Properties
Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ DocPr of i l e. aspx
Overview
WorkSite Web Application Integration Toolkit Developers Guide 49

Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
DocPr of i l e. aspx?nr t i d=! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! document
: 229713, 5: &r edi r ect =ht t p: / / www. yahoo. com
Table 22 Parameter for editing or viewing a documents properties
Parameter Description Acceptable Value(s)
Additional
Information
nrtid The IWOV moniker for the
object on which the operation
is being performed
!nrtdms:0:!session:test-server:!dat
abase:test-db:!document:225387,1:
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Editing or Viewing a Folder's Properties
Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ Fol der Edi t . aspx
Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
Fol der Edi t . aspx?nr t i d=! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! f ol der : o
r di nar y, 45789: &op=edi t &r edi r ect =ht t p: / / www. yahoo. com
Table 23 Parameter for editing or viewing a folder's properties
Parameter Description Acceptable Value(s)
Additional
Information
nrtid The IWOV moniker for the
object on which the operation
is being performed
nrtdms:0:!session:test-server:!data
base:test-db:!folder:ordinary,4578
9:
op Indicates that the operation
being performed is an edit
edit This value is
case-sensitive
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Chapter 2: Addressable URLs for WorkSite Web Components Server
50 WorkSite Web Application Integration Toolkit Developers Guide

Editing or Viewing a Workspace's Properties


Base URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ Page. aspx
Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/ Page. aspx?page=
! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! page: 37964: &op=edi t &r edi r ect =h
t t p: / / www. yahoo. com
Table 24 Parameters for editing or viewing a Workspace's properties
Parameter Description Acceptable Value(s)
Additional
Information
page The IWOV moniker for the
object on which the operation
is being performed
!nrtdms:0:!session:test-server:!dat
abase:test-db:!page:37964:
op Indicates that the operation being
performed is an edit
edit This value is
case-sensitive
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Sending Links to Workspaces via Email
Base URL:
http://localhost/worksite/scripts/docMailto.aspx
Using the WorkSite Web Dialog Callback
WorkSite Web Application Integration Toolkit Developers Guide 51

Sample URL:
ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
docMai l t o. aspx?i sLi nk=1&nr t i d=! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: !
page: 24904: ^! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! page: 43198: &subj ec
t =Sendi ngWor kspaces&r edi r ect =ht t p: / / www. yahoo. com
Table 25 Parameters for sending links to Workspaces via e-mail
Parameter Description Acceptable Value(s)
Additional
Information
nrtid The IWOV moniker(s) for the
object(s) on which the
operation is being performed
For a single operation:
!nrtdms:0:!session:test-server:!dat
abase:test-db:!page:24904:
For multiple operations:
!nrtdms:0:!session:test-server:!dat
abase:test-db:!page:24904:^
!nrtdms:0:!session:test-server:!dat
abase:test-db:!page:43198:
For multi-operation,
monikers must be
separated using
constant
kMultiOpSeparator
(character ^) as
defined in includes/
common.js
isLink Indicates that a URL link to
WorkSite Web should be
created in the body of the
message
1 =URL links to WorkSite Web
created in the body of the message
This parameter must
be set to 1 for the
dialog to render
correctly
subject The subject line for the email
message
Any string value
redirect The URL to which the user is
redirected upon completion of
the operation
Fully qualified URL
Using the WorkSite Web Dialog Callback
The dialog callback feature in WorkSite Web allows a client-side J ava Script function to be
called upon completion of an operation. For example, when you import new documents, the
Import dialog will send the new monikers for the documents to the callback function.
To use the dialog callback feature:
1. Open the import URL in a new window.
2. Inside your HTML, define a function called worksiteDialogCallBack that takes result as
an argument.
3. Write your custom code to utilize the result.nrtids property. This property is an array and
can be accessed using a for-loop declaration.
Chapter 2: Addressable URLs for WorkSite Web Components Server
52 WorkSite Web Application Integration Toolkit Developers Guide

Example:
<ht ml >
<body>
<a oncl i ck="openLi nk( ) " hr ef =" #" >I mpor t Document t o Wor kSi t e
Web</ a>
scr i pt >
f unct i on openLi nk( )
{
var ur l = " ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
Checki n. aspx?dest =! nr t dms: 0: ! sessi on: t est - ser ver : ! dat abase: t est - db: ! f ol der : or di n
ar y, 45789: ";
wi ndow. open( ur l ) ;
}
f unct i on wor ksi t eDi al ogCal l Back( r esul t )
{
f or ( var i =0; i < r esul t . nr t i ds. l engt h; i ++)
{
/ / Put your cust omcode her e t o handl e t he ar r ay of nr t i ds
al er t ( r esul t . nr t i ds[ i ] )
}
}
</ scr i pt >
</ body>
</ ht ml >
WorkSite Web Application Integration Toolkit Developers Guide 53

Chapter 3
Enhanced Browse Dialog
Overview
The classic browse dialog is very powerful. It allows users to navigate through the WorkSite
Web hierarchy in search of WorkSite objects. However, there are two limitations to the classic
browse dialog. First, users cannot use WorkSite Webs search functionality to locate documents
or workspaces; they must navigate through the directory tree. Second, the classic browse dialog
supports single-item selection only. The enhanced browse dialog has been created to overcome
these limitations for developers and end-users. The following sections in this guide describe
how developers can leverage the features of the enhanced browse dialog with minimal coding
efforts.
Using Enhanced Browse Dialog
The enhanced browse dialog object behaves similarly to the classic browse dialog object. You
invoke the enhanced browse dialog by using a WorkSite Web URL and passing special
parameters. When the user makes a selection and clicks the OK button on the enhanced browse
dialog, a callback on the client-side is invoked. The only difference is that the enhanced browse
dialog's callback parameters are slightly different than the parameters passed to the classic
browse dialog.
The enhanced browse dialog object is accessed through WorkSite Web's BrowseDlgEx.aspx
page using the following URL: http://<server>/<worksite>/scripts/BrowseDlgEx.aspx. Replace
Chapter 3: Enhanced Browse Dialog
54 WorkSite Web Application Integration Toolkit Developers Guide

<server>and <worksite>with the appropriate names for your Web server and virtual directory.
The table below describes the parameters you must pass to BrowseDlgEx.aspx.
Table 26 Parameters passed to BrowseDlgEx.aspx
Parameter Description Accepted Values
mul t i Sel ect
Determines whether the enhanced
browse dialog should allow the
user to select multiple or single
items.
0 user can select single item
1 user can select more than one
item
t i t l e
The HTML title that appears
when the enhanced browse dialog
is displayed.
Any string value
cal l back
The callback function that the
enhanced browse dialog executes
when the user has made a
selection. This is the custom
action to be taken with the items
selected in the enhanced browse
dialog.
Any valid function name.
cont ent Type
Determines the type of content
that can be selected.
BrowseTreeNodeEnums.Docume
nt and
BrowseTreeNodeEnums.Workspa
ce are currently supported.
BrowseTreeNodeEnums.Docum
ent or
BrowseTreeNodeEnums.Work-
space.
Any other value will result in
allowing selection of
workspaces or documents in
the contents pane. However,
the search form will only be
for documents.
Br owseTr eeNodeEnums is a
client-side object, so you must
instantiate it using the "new"
keyword.
You must include <server>/
<worksite>/utility.js and
<server>/<worksite>/
includes/common.js to utilize
Br owseTr eeNodeEnums.
page
Allows the tree to display both
My WorkSite and a workspace.
A moniker for any valid
workspace or workspace
shortcut.
If the user does not have
access to the workspace, the
tree will be empty.
context A pass-through parameter used
for the callback function.
A string value that the callback
knows how to handle.
Client-side Callback Function
WorkSite Web Application Integration Toolkit Developers Guide 55

Client-side Callback Function


You perform your customizations via the callback function. The enhanced browse dialog sends
the selected objects back in a special format, and your callback function for the enhanced
browse dialog must have a specific signature.
The callback signature for the enhanced browse dialog is different than the signature for the
classic browse dialog. If you have used the classic browse dialog in the past and want to upgrade
to the enhanced browse dialog, you must modify the callback's signature or create a separate
callback for the enhanced browse dialog.
The table below describes the required parameters for the enhanced browse dialog callback.
Example
This section provides a sample of how you would use the enhanced browse dialog. To
streamline the user experience, you should enable auto trusted login on the WorkSite Web
Table 27 Required parameters for enhanced browse dialog callback
Callback Parameter Description
window The window in which the enhanced browse dialog resides.
Allows you to close the window when you have finished
processing the selected items.
cmd Preserved for backward-compatibility. The enhanced browse
dialog sets the value to "ok".
objArray An array of objects selected in the enhanced browse dialog.
Each object in the array has the properties listed below.
nrtid The object's moniker.
title The object's title. This is the document description or the
workspace title.
img The image that was displayed in the enhanced browse tree.
href A URL that allows access to the object through WorkSite
Web. For a document, the URL will go to GetDoc.aspx. The
URL for a workspace will go to Home.aspx.
id The id for the enhanced browse dialog.
target Reserved for backward-compatibility. The enhanced browse
dialog sets this to empty string.
context The context parameter that was passed to BrowseDlgEx.aspx.
Your callback function may have logic based on this context
value.
Chapter 3: Enhanced Browse Dialog
56 WorkSite Web Application Integration Toolkit Developers Guide

Components Server. This eliminates prompting with the WorkSite Web login dialog before
displaying the enhanced browse dialog. Consult the WorkSite Web Components Server
Installation Manual for details on setting up auto trusted login.
To use the enhanced browse dialog:
1. Create an HTML file that contains a link to the enhanced browse dialog in a new window.
NOTE
The enhanced browse dialog has been designed to work in a new window. If you do not
open the enhanced browse dialog in a new window, the callback will not work.
2. Include utility.js and common.js in your HTML file so that you can instantiate
Br owseTr eeNodeEnums to set the cont ent Type parameter.
3. Define your callback.
A full URL to the enhanced browse dialog would resemble the following URL:
ht t p: / / ser ver 1/ wor ksi t e/ scr i pt s/
Br owseDl gEx. aspx?mul t i Sel ect =1&t i t l e=At t ach&cal l back=myCust omCal l back&cont en
t Type=8192&cont ext =myCont ext St r i ng
Sample code
The following code creates a link to the enhanced browse dialog and illustrates the callback
function when an item is selected.
<ht ml >
<head>
<scr i pt l anguage=" j avascr i pt " sr c=" ht t p: / / l ocal host / wor ksi t e/ i ncl udes/
ut i l i t y. j s"></ scr i pt >
<scr i pt l anguage=" j avascr i pt " sr c=" ht t p: / / l ocal host / wor ksi t e/ i ncl udes/
common. j s" ></ scr i pt >
<scr i pt >
f unct i on at t achDocument ( )
{
var t r eeEnum= new Br owseTr eeNodeEnums( ) ;
var cont ent Type = t r eeEnum. Document ;
/ / t hi s ur l does not have a wor kspace moni ker , so t he enhanced br owse
/ / di al og wi l l di spl ay My Wor kSi t e onl y
var ur l =
" ht t p: / / l ocal host / wor ksi t e/ scr i pt s/
Br owseDl gEx. aspx?mul t i Sel ect =1&t i t l e=At t ach&cal l back=myCust omCal l back&cont ent Typ
e=" +
Client-side Callback Function
WorkSite Web Application Integration Toolkit Developers Guide 57

cont ent Type + " &cont ext =myCont ext St r i ng" ;


wi ndow. open( ur l ) ;
}
f unct i on myCust omCal l back( wnd, cmd, obj Ar r ay, i d, t ar get , cont ext )
{
/ / f or each obj ect i n t he ar r ay, wr i t e t he pr oper t i es out i n HTML
f or ( i =0; i < obj Ar r ay. l engt h; i ++ )
{
var nr t i d = obj Ar r ay[ i ] . nr t i d;
var t i t l e = obj Ar r ay[ i ] . t i t l e;
var i mg = obj Ar r ay[ i ] . i mg;
var hr ef = obj Ar r ay[ i ] . hr ef ;
/ / we gr ab t he di v t ag t hat ' s i n t he ht ml body and gi ve i t some HTML
var di vTag = document . get El ement ByI d( ' t est Di v' ) ;
i f ( di vTag )
{
di vTag. i nner HTML += " <p>I t em#" + ( i +1) + " sel ect ed i n t he enhanced
br owse di al og: <p/ >" +
" <ul >" +
" <l i >nr t i d=" + nr t i d + " </ l i >" +
" <l i >t i t l e=" + t i t l e + " </ l i >" +
" <l i >i mg=" + i mg + "</ l i >" +
" <l i >hr ef =" + hr ef + " </ l i >"
}
}
/ / we cl ose t he wi ndow wi t h t he enhanced br owse di al og i n i t
i f ( wnd )
{
wnd. cl ose( )
}
}
</ scr i pt >
</ head>
<body>
<a hr ef =" #" oncl i ck=" at t achDocument ( ) " >Sel ect Wor kSi t e Document s</ a>
<! - - The cal l back f unct i on wi l l popul at e t hi s wi t h t he pr oper t i es of t he
obj ect s sel ect ed i n t he di al og - - >
<di v i d=" t est Di v" ></ di v>
</ body>
Chapter 3: Enhanced Browse Dialog
58 WorkSite Web Application Integration Toolkit Developers Guide

WorkSite Web Application Integration Toolkit Developers Guide 59

Chapter 4
WorkSite Web Service
WorkSite Web service makes it possible to access and work with WorkSite data from within any
application without using the WorkSite Web user interface. Using the WorkSite Web service is
the easiest way to programmatically create documents, folders and workspaces without using
the i Manage. dl l . In the examples in this document, the Web service is consumed within a .Net
environment using the C#programming language, but the Web service is not platform - or
language-specific.
There are two advantages to using Web services. First, Web services use a standard protocol of
well-formed XML that is not platform-specific. Second, because the service is based on the
hypertext transfer protocol (HTTP), access is not restricted to a network. The Web service can
be consumed from any location.
NOTE
You can use the Ser vi cesCl i ent project for reference purposes to see how the Web service can
be consumed. You can also use this project to test the WorkSite Web service. The
Ser vi cesCl i ent project is located in the Samples folder in the installation path.
Consuming the Web Service
To consume the WorkSite Web Service in ASP.Net:
1. Open your application in Visual Studio.NET.
2. In the Solution Explorer pane, right-click References.
Chapter 4: WorkSite Web Service
60 WorkSite Web Application Integration Toolkit Developers Guide

Figure 4 Solution Explorer view


3. Select Add Web Reference. The Add Web Reference dialog opens.
4. Enter the URL of the WorkSite Web service:
http://<localhost>/worksite/services/IWOVServices.asmx
wher e
<l ocal host > i s t he name of t he Wor kSi t e Web Component Ser ver t o whi ch you ar e
connect ed.
5. Click Go. The Web service is downloaded from the WorkSite Web Component Server and
appears in the window, as shown below.
Consuming the Web Service
WorkSite Web Application Integration Toolkit Developers Guide 61

Figure 5 Add Web Reference dialog


NOTE
If you want to view the SOAP code for the WorkSite Web service, click any method in the
list shown below. The XML code will appear in the window. Click Service Description to
view the XML schema file for the Web service.
6. Click the Add Reference button to add the reference to your Visual Basic or C#project. The
reference appears as a new node in the Solution Explorer tree.
Chapter 4: WorkSite Web Service
62 WorkSite Web Application Integration Toolkit Developers Guide

Figure 6 Web reference appears in Solution Explorer


Description of the WorkSite Web Service
Web Service Name: IWOVServices
URL: ht t p: / / l ocal host / wor ksi t e/ ser vi ces/ I WOVSer vi ces. asmx
WSDL: ht t p: / / l ocal host / wor ksi t e/ ser vi ces/ I WOVSer vi ces. asmx?wsdl
Authentication: The WorkSite Web Service client must authenticate with the Web Server (IIS)
using one of the following methods: Basic, Digest, NTLM, Kerberos, Certificates. The
authenticated account must exist in WorkSite Web and must be able to do Trusted Login.
NOTE
To use the WorkSite Web Service, you must be familiar with the WorkSite Component Object
Model. See the COM Reference Guide for WorkSite, available as part of the Software
Developers Kit on the WorkSite installation CD.
Web Methods
The following Web methods are supported by the WorkSite Web service:
Consuming the Web Service
WorkSite Web Application Integration Toolkit Developers Guide 63

Document Operations
CreateDocuments
SetDocumentsProperties
CheckinReplaceOriginal
CheckinNewVersion
CheckinReplaceOriginal
CheckinUndo
GetDocuments
WorkSpace Operations
CreateWorkspaces
SetWorkspacesProperties
GetWorkspaces
Folder Operations
CreateFolders
GetFolders
GetSubFolders
GetFolderContents
GetSubFolders
SetFoldersProperties
Searches
SearchDocuments
SearchWorkspaces
Other Operations
CreateCustomAttributes
GetCustomAttributes
Chapter 4: WorkSite Web Service
64 WorkSite Web Application Integration Toolkit Developers Guide

Using Web Methods


Each Web method in the WorkSite Web Service has an input message and an output message.
You will need to enter values for the parameters of the input message and for parameters of
substructures within the input message. The Web service processes the input message of a
particular method and returns an output message of the same method, assigning values to
parameters requested in the OutputMask property of the input message.
Document Operations
CreateDocuments
Input Message
publ i c cl ass Cr eat eDocument sI nput
{
publ i c st r i ng Dest i nat i onI D;
publ i c bool UseFol der Pr of i l e;
publ i c Document [ ] Document s;
publ i c Out put Mask Out put Mask;
publ i c i mPr of i l eAt t r i but eI D[ ] Out put Pr of i l e;
}
wher e
DestinationID = the moniker of the folder where you want to create the document
UseFolderProfile = When True, the folders default document profile values are applied to the
document; when False, user can assign profile values to the document
Documents = an array of one or more items of type Document (see Document on page 84)
OutputMask = the bit mask for the document properties to be populated in the output message
for successfully created documents (see OutputMask on page 89)
OutputProfile = an array of one or more document profile attribute IDs for which the document
profile items will be populated in the output message for successfully created documents (see
imProfileAttributeID on page 96)
Output Message
publ i c cl ass Cr eat eDocument sOut put
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 65

{
publ i c Document [ ] Document s;
publ i c Er r or [ ] Er r or s;
}
wher e
Documents = an array of one or more new documents of type Document (see Document on
page 84)
Errors = an array of one or more items of type Error (see Error on page 86)
CheckOut
Input Message
publ i c cl ass CheckOut I nput
{
publ i c st r i ng[ ] Obj ect I Ds;
publ i c st r i ng Comment ;
publ i c st r i ng DueDat e;
publ i c i mCheckOut Opt i ons CheckOut Opt i on;
publ i c i mPr of i l eAt t r i but eI D[ ] Out put Pr of i l e;
publ i c Out put Mask Out put Mask;
}
wher e
ObjectIDs = String. An array of one or more monikers of documents to be checked out
Comment = a comment to be entered on the document during checkout
DueDate = the date by which the document(s) should be checked in
CheckOutOption = an enum of type imCheckOutOption (see imCheckOutOptions on
page 95)
OutputProfile = an array of one or more document profile attribute IDs for which the document
profile items will be populated in the output message for successfully checked out documents
(see imProfileAttributeID on page 96)
OutputMask = the bit mask for the document properties to be populated in the output message
for successfully checked out documents (see OutputMask on page 89)
Output Message
publ i c cl ass CheckOut Out put
Chapter 4: WorkSite Web Service
66 WorkSite Web Application Integration Toolkit Developers Guide

{
publ i c Document [ ] Document s;
publ i c Er r or [ ] Er r or s;
}
wher e
Documents = an array of one or more items of type Document that were successfully checked
out (see Document on page 84)
Errors = an array of one or more items of type Error (see Error on page 86)
CheckinReplaceOriginal
Input Message
publ i c cl ass Checki nRepl aceOr i gi nal I nput
{
publ i c Document [ ] Document s;
publ i c st r i ng Comment ;
}
wher e
Documents = an array of one or more items of type Document (see Document on page 84)
Comment = a comment to be entered on the document during checkin
Output Message
publ i c cl ass Checki nRepl aceOr i gi nal Out put
{
publ i c Er r or [ ] Er r or s;
}
wher e
Errors = an array of one or more items of type Error (see Error on page 86)
CheckinNewVersion
Input Message
publ i c cl ass Checki nNewVer si onI nput
{
publ i c st r i ng Dest i nat i onI D;
publ i c st r i ng Comment ;
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 67

publ i c bool UseFol der Pr of i l e;


publ i c Document [ ] Document s;
publ i c Out put Mask Out put Mask;
publ i c i mPr of i l eAt t r i but eI D[ ] Out put Pr of i l e;
}
wher e
DestinationID = the moniker of the folder where the new version is being checked in
Comment = a comment to be entered on the document during checkin
UseFolderProfile = When True, the new version inherits the profile from the destination folder
Documents = an array of one or more items of type Document to be checked in (see
Document on page 84)
OutputMask = the bit mask for the document properties to be populated in the output message
for successfully checked in documents (see OutputMask on page 89)
OutputProfile = an array of one or more document profile attribute IDs for which the document
profile items will be populated in the output message for successfully checked in documents
(see imProfileAttributeID on page 96)
Output Message
publ i c cl ass Checki nNewVer si onOut put
{
publ i c Document [ ] Document s;
publ i c Er r or [ ] Er r or s;
}
wher e
Documents = an array of one or more items of type Document to be checked in (see
Document on page 84)
Errors = an array of one or more items of type Error (see Error on page 86)
CheckinNewDocument
Input Message
publ i c cl ass Checki nNewDocument I nput
{
publ i c st r i ng Dest i nat i onI D;
publ i c st r i ng Comment ;
Chapter 4: WorkSite Web Service
68 WorkSite Web Application Integration Toolkit Developers Guide

publ i c bool UseFol der Pr of i l e;


publ i c Document [ ] Document s;
publ i c Out put Mask Out put Mask;
publ i c i mPr of i l eAt t r i but eI D[ ] Out put Pr of i l e;
}
wher e
DestinationID = the moniker of the folder where the new document is being checked in
Comment = a comment to be entered on the document during checkin
UseFolderProfile = When True, the new document inherits the profile from the destination
folder
Documents = an array of one or more items of type Document to be checked in (see
Document on page 84)
OutputMask = the bit mask for the document properties to be populated in the output message
for successfully checked in documents (see OutputMask on page 89)
OutputProfile = an array of one or more document profile attribute IDs for which the document
profile items will be populated in the output message for successfully checked in documents
(see imProfileAttributeID on page 96)
Output Message
publ i c cl ass Checki nNewDocument Out put
{
publ i c Document [ ] Document s;
publ i c Er r or [ ] Er r or s;
}
wher e
Documents = an array of one or more items of type Document that were successfully checked in
(see Document on page 84)
Errors = an array of one or more items of type Error (see Error on page 86)
CheckinUndo
Input Message
publ i c cl ass Checki nUndoI nput
{
publ i c st r i ng[ ] Obj ect I Ds;
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 69

publ i c st r i ng Comment ;
}
wher e
ObjectIDs = String. An array of one or more monikers of checked-out documents
Comment = a comment to be entered on the document during checkin
Output Message
publ i c cl ass Checki nUndoOut put
{
publ i c Er r or [ ] Er r or s;
}
wher e
Errors =an array of one or more items of type Error (see Error on page 86)
SetDocumentsProperties
Input Message
publ i c cl ass Set Document sPr oper t i esI nput
{
publ i c st r i ng Dest i nat i onI D;
publ i c Document [ ] Document s;
publ i c i mPr of i l eAt t r i but eI D[ ] Out put Pr of i l e;
publ i c Out put Mask Out put Mask;
}
wher e
DestinationID = the moniker of the destination folder
Documents = an array of one or more items of type Document (see Document on page 84)
OutputProfile = an array of one or more document profile attribute IDs for which the profile
items will be populated in the output message for the documents properties (see
imProfileAttributeID on page 96)
OutputMask = the bit mask for the document properties to be populated in the output message
for documents (see OutputMask on page 89)
Output Message
publ i c cl ass Set Document sPr oper t i esOut put
{
Chapter 4: WorkSite Web Service
70 WorkSite Web Application Integration Toolkit Developers Guide

publ i c Document [ ] Document s;


publ i c Er r or [ ] Er r or s;
}
wher e
Documents = an array of one or more items of type Document (see Document on page 84)
Errors = an array of one or more items of type Error (see Error on page 86)
GetDocuments
Input Message
publ i c cl ass Get Document sI nput
{
publ i c st r i ng[ ] Obj ect I Ds;
publ i c i mPr of i l eAt t r i but eI D[ ] Out put Pr of i l e;
publ i c Out put Mask Out put Mask;
}
wher e
ObjectIDs = an array of monikers of one or more documents
OutputProfile = an array of one or more document profile attributes IDs for which the profile
items will be populated in the output message for the documents (see imProfileAttributeID on
page 96)
OutputMask = the bit mask for the document properties to be populated in the output message
for retrieved documents (see OutputMask on page 89)
Output Message
publ i c cl ass Get Document sOut put
{
publ i c Document [ ] Document s;
publ i c Er r or [ ] Er r or s;
}
wher e
Documents = an array of one or more items of type Document (see Document on page 84)
Errors = an array of one or more items of type Error (see Error on page 86)
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 71

WorkSpace Operations
CreateWorkspaces
NOTE
Chapter 5, Workspace Creation Web Service, explains how to create workspaces using a
different WorkSite Web service.
Input Message
publ i c cl ass Cr eat eWor kspacesI nput
{
publ i c NewWor kspace[ ] Wor kspaces;
publ i c st r i ng Dest i nat i onDat abase;
publ i c i mPr of i l eAt t r i but eI D[ ] Out put Pr of i l e;
publ i c Out put Mask Out put Mask;
}
wher e
Workspaces = an array of one or more items of type New Workspace (see NewWorkspace :
Workspace on page 87)
DestinationDatabase = the database name where the workspace is being created
OutputProfile = an array of one or more workspace profile attribute IDs for which the profile
items will be populated in the output message for successfully created workspaces (see
imProfileAttributeID on page 96)
OutputMask = the bit mask for the workspace properties to be populated in the output message
for successfully created new workspaces (see OutputMask on page 89)
Output Message
publ i c cl ass Cr eat eWor kspacesOut put
{
publ i c Wor kspace[ ] Wor kspaces;
publ i c Er r or [ ] Er r or s;
}
wher e
Workspaces = an array of one or more items of type Workspace (see WorkSpace on page 91)
Errors = an array of one or more items of type Error (see Error on page 86)
Chapter 4: WorkSite Web Service
72 WorkSite Web Application Integration Toolkit Developers Guide

SetWorkspacesProperties
Input Message
publ i c cl ass Set Wor kspacesPr oper t i esI nput
{
publ i c Wor kspace[ ] Wor kspaces;
publ i c i mPr of i l eAt t r i but eI D[ ] Out put Pr of i l e;
publ i c Out put Mask Out put Mask;
}
wher e
Workspaces = an array of one or more items of type Workspace (see WorkSpace on page 91)
OutputProfile = an array of one or more workspace profile attribute IDs of type Pr of i l eI t em
for which the profile items will be populated in the output message for the workspaces
properties (see imProfileAttributeID on page 96)
OutputMask = the bit mask for the workspace properties to be populated in the output message
for the workspaces (see OutputMask on page 89)
Output Message
publ i c cl ass Set Wor kspacesPr oper t i esOut put
{
publ i c Wor kspace[ ] Wor kspaces;
publ i c Er r or [ ] Er r or s;
}
wher e
Workspaces = an array of one or more items of type Workspace (see WorkSpace on page 91)
Errors = an array of one or more items of type Error (see Error on page 86)
GetWorkspaces
Input Message
publ i c cl ass Get Wor kspacesI nput
{
publ i c st r i ng[ ] Obj ect I Ds;
publ i c i mPr of i l eAt t r i but eI D[ ] Out put Pr of i l e;
publ i c Out put Mask Out put Mask;
}
wher e
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 73

ObjectIDs = an array of one or more workspace monikers


OutputProfile = an array of one or more workspace profile attribute IDs for which the profile
items will be populated in the output message for the workspaces retrieved (see
imProfileAttributeID on page 96)
OutputMask = the bit mask for the workspace properties to be populated in the output message
for retrieved workspaces (see OutputMask on page 89)
Output Message
publ i c cl ass Get Wor kspacesOut put
{
publ i c Wor kspace[ ] Wor kspaces;
publ i c Er r or [ ] Er r or s;
}
wher e
Workspaces = an array of one or more items of type Workspace (see WorkSpace on page 91)
Errors = an array of one or more items of type Error (see Error on page 86)
Folder Operations
CreateFolders
Input Message
publ i c cl ass Cr eat eFol der sI nput
{
publ i c st r i ng Dest i nat i onI D;
publ i c Document Fol der [ ] Fol der s;
publ i c Out put Mask Out put Mask;
}
wher e
DestinationID = the moniker of the container where the folder is being created
Folders = an array of one or more items of type Folder (see DocumentFolder on page 85)
OutputMask = the bit mask for the folder properties to be populated in the output message for
successfully created document folders (see OutputMask on page 89)
Chapter 4: WorkSite Web Service
74 WorkSite Web Application Integration Toolkit Developers Guide

Output Message
publ i c cl ass Cr eat eFol der sOut put
{
publ i c Document Fol der [ ] Fol der s;
publ i c Er r or [ ] Er r or s;
}
wher e
Folders = an array of one or more items of type Document Fol der (see DocumentFolder on
page 85)
Errors = an array of one or more items of type Error (see Error on page 86)
SetFoldersProperties
Input Message
publ i c cl ass Set Fol der sPr oper t i esI nput
{
publ i c Document Fol der [ ] Fol der s;
publ i c Out put Mask Out put Mask;
}
wher e
Folders = an array of one or more items of type Document Fol der (see DocumentFolder on
page 85)
OutputMask = the bit mask for the folder properties to be populated in the output message for
the folders (see OutputMask on page 89)
Output Message
publ i c cl ass Set Fol der sPr oper t i esOut put
{
publ i c Document Fol der [ ] Fol der s;
publ i c Er r or [ ] Er r or s;
}
wher e
Folders = an array of one or more items of type Document Fol der (see DocumentFolder on
page 85)
Errors = an array of one or more items of type Error (see Error on page 86)
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 75

GetFolders
Input Message
publ i c cl ass Get Fol der sI nput
{
publ i c st r i ng[ ] Obj ect I Ds;
publ i c Out put Mask Out put Mask;
}
wher e
ObjectIDs = an array of one or more folder monikers
OutputMask = the bit mask for the folder properties to be populated in the output message for
retrieved folders (see OutputMask on page 89)
Output Message
publ i c cl ass Get Fol der sOut put
{
publ i c Document Fol der [ ] Fol der s;
publ i c Er r or [ ] Er r or s;
}
wher e
Folders = an array of one or more items of type Document Fol der (see DocumentFolder on
page 85)
Errors = an array of one or more items of type Error (see Error on page 86)
GetFolderContents
The following method is used to get documents in a folder.
Input Message
publ i c cl ass Get Fol der Cont ent sI nput
{
publ i c st r i ng Obj ect I D;
publ i c i mPr of i l eAt t r i but eI D[ ] Out put Pr of i l e;
publ i c Out put Mask Out put Mask;
}
wher e
ObjectID = the moniker of the folder
Chapter 4: WorkSite Web Service
76 WorkSite Web Application Integration Toolkit Developers Guide

OutputProfile = an array of one or more document profile attribute IDs for which the profile
items will be populated in the output message for the documents retrieved (see
imProfileAttributeID on page 96)
OutputMask = the bit mask for the document properties to be populated in the output message
for retrieved documents (see OutputMask on page 89)
Output Message
publ i c cl ass Get Fol der Cont ent sOut put
{
publ i c Document [ ] Document s;
publ i c Er r or [ ] Er r or s;
}
wher e
Documents = an array of one or more items of type Document (see Document on page 84)
Errors = an array of one or more items of type Error (see Error on page 86)
GetSubFolders
Input Message
publ i c cl ass Get SubFol der sI nput
{
publ i c st r i ng Obj ect I D;
publ i c Out put Mask Out put Mask;
}
wher e
ObjectID = the moniker of the folder
OutputMask = the bit mask for the folder properties to be populated in the output message for
retrieved folders (see OutputMask on page 89)
Output Message
publ i c cl ass Get SubFol der sOut put
{
publ i c Document Fol der [ ] Fol der s;
publ i c Er r or [ ] Er r or s;
}
wher e
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 77

Folders = an array of one or more items of type Document Fol der (see DocumentFolder on
page 85)
Errors = an array of one or more items of type Error (see Error on page 86)
Searches
SearchDocuments
Input Message
publ i c cl ass Sear chDocument sI nput
{
publ i c st r i ng[ ] Dat abases;
publ i c i mPr of i l eAt t r i but eI D[ ] Out put Pr of i l e;
publ i c Pr of i l eSear chPar amet er [ ] Pr of i l eSear chPar amet er s;
publ i c i mSear chEmai l Sear chEmai l ;
publ i c Ful l Text Sear ch Ful l Text Sear ch;
publ i c Out put Mask Out put Mask;
}
wher e
Databases = an array of one or more database names
OutputProfile = an array of one or more document profile attribute IDs for which the profile
items will be populated in the output message for the documents returned by the search (see
imProfileAttributeID on page 96)
ProfileSearchParameter = an array of one or more items of type Profile Search Parameter (see
ProfileSearchParameter on page 90)
SearchEmail = enumerated value of type i mSear chEmai l (see imSearchEmail on page 98)
FullTextSearch = an item of the type FullTextSearch (see FullTextSearch on page 86)
OutputMask = the bit mask for the document properties to be populated in the output message
for documents returned in the search (see OutputMask on page 89)
Output Message
publ i c cl ass Sear chDocument sOut put
{
publ i c Document [ ] Document s;
Chapter 4: WorkSite Web Service
78 WorkSite Web Application Integration Toolkit Developers Guide

publ i c Er r or [ ] Er r or s;
}
wher e
Documents = an array of one or more items of type Document (see Document on page 84)
Errors = an array of one or more items of type Error (see Error on page 86)
SearchWorkspaces
Input Message
publ i c cl ass Sear chWor kspacesI nput
{
publ i c st r i ng[ ] Dat abases;
publ i c i mPr of i l eAt t r i but eI D[ ] Out put Pr of i l e;
publ i c Pr of i l eSear chPar amet er [ ] Pr of i l eSear chPar amet er s;
publ i c Fol der Sear chPar amet er [ ] Wor kspaceSear chPar amet er s;
publ i c Out put Mask Out put Mask;
}
wher e
Databases = an array of one or more database names to be searched
OutputProfile = an array of one or more Workspace Profile Attribute IDs for which the profile
items will be populated in the output message for the workspaces returned by the search (see
imProfileAttributeID on page 96)
ProfileSearchParameters = an array of one or more search parameters of type
Pr of i l eSear chPar amet er (see ProfileSearchParameter on page 90)
WorkspaceSearchParameters = an array of one or more search parameters of type
FolderSearchParameter (see FolderSearchParameter on page 86)
OutputMask = the bit mask for the workspace properties to be populated in the output message
for workspaces returned by the search (see OutputMask on page 89)
Output Message
publ i c cl ass Sear chWor kspacesOut put
{
publ i c Wor kspace[ ] Wor kspaces;
publ i c Er r or [ ] Er r or s;
}
wher e
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 79

Workspaces = an array of one or more items of type Workspace (see WorkSpace on page 91)
Errors = an array of one or more items of type Error (see Error on page 86)
Other Operations
CreateCustomAttributes
Input Message
publ i c cl ass Cr eat eCust omAt t r i but esI nput
{
publ i c Cust omAt t r i but e[ ] Cust omAt t r i but es;
publ i c st r i ng Dat abase;
}
wher e
CustomAttributes = an array of one or more items of type Cust omAt t r i but e
Database = database name to which the custom attribute is added
Output Message
publ i c cl ass Cr eat eCust omAt t r i but esOut put
{
publ i c Er r or [ ] Er r or s;
}
wher e
Errors = an array of one or more items of type Error (see Error on page 86)
GetCustomAttributes
Input Message
publ i c cl ass Get Cust omAt t r i but esI nput
{
publ i c st r i ng Sear chCr i t er i on;
publ i c i mSear chAt t r i but eType Sear chType;
publ i c i mPr of i l eAt t r i but eI D Cust omAt t r i but eI D;
/ / Cust om1 - Cust om12 & Cust om29 - Cust om30
Chapter 4: WorkSite Web Service
80 WorkSite Web Application Integration Toolkit Developers Guide

publ i c st r i ng Dat abase;


}
wher e
SearchCriterion = string to be matched during the search
SearchType = the attribute ID of a search type of type i mSear chAt t r i but eType (see
imSearchAttributeType on page 98)
CustomAttributeID = the attribute ID of the custom field of type i mPr of i l eAt t r i but eI D.
Valid values are imProfileCustom1-imProfileCustom12 and imProfileCustom29-
imProfileCustom30.
Database = database name
Output Message
publ i c cl ass Get Cust omAt t r i but esOut put
{
publ i c Cust omAt t r i but e[ ] Cust omAt t r i but es;
publ i c Er r or [ ] Er r or s;
}
wher e
CustomAttributes = an array of one or more custom attribute IDs of type Cust omAt t r i but e
Errors = an array of one or more items of type Error (see Error on page 86)
GetObjects
This Web method is used to get information about Document, Workspace, and Folder items
(objects) in WorkSite based on their moniker.
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 81

The information that you can get depends on the type of object for which the moniker is being
passed. A combination of Out put Mask and Out put Pr of i l e parameters that are passed to this
Web method.
Input Message
publ i c cl ass Get Obj ect sI nput
{
publ i c st r i ng[ ] Obj ect I Ds;
publ i c i mPr of i l eAt t r i but eI D[ ] Out put Pr of i l e;
publ i c Out put Mask Out put Mask;
}
Where
ObjectIDs =array of one or more monikers
Table 28 Supported OutputMask bits for a moniker type
Moniker Type Supported OutputMask bits
Document Profile
Note: If the Profile bit is set in OutputMask, then populate the OutputProfile
parameter with the desired document profile attribute IDs.
Security
History
Content
Workspace Profile
Note: If the Profile bit is set in OutputMask, then populate the OutputProfile
parameter with the desired workspace profile attribute IDs.
Security
SubFolders
CustomProperties
AdditionalProperties
Folder Security
SubFolders
Contents (Documents directly under that folder)
CustomProperties
AdditionalProperties
Note: OutputProfile is not supported for Folder Monikers.
Chapter 4: WorkSite Web Service
82 WorkSite Web Application Integration Toolkit Developers Guide

OutputProfile =an array of one or more document/workspace profile attribute IDs for which
the profile items will be populated in the output message (see imProfileAttributeID on
page 96)
NOTE
This is applicable only if the WorkSite item is a Workspace or a document.
OutputMask =the bit mask for the object properties to be populated in the output message (see
OutputMask on page 89)
Output Message
publ i c cl ass Get Obj ect sOut put
{
publ i c WSObj ect [ ] WSObj ect s;
publ i c Er r or [ ] Er r or s;
}
Where
WSObjects =an array of one or more WorkSite object with the requested data populated based
on the OutputMask and OutputProfile. (see WSObject on page 92)
Errors =an array of one or more items of type Error (see Error on page 86)
Substructures
The following structures are elements within the Web service input and output messages. When
you use a Web method in the WorkSite Web service, you will also need to enter values for the
parameters of substructures, such as document or workspace. The substructures appear as nested
elements within the Web service XML, as shown in iwovservices.asmx.
AclItem
publ i c cl ass Acl I t em
{
publ i c Acl Type Type;
publ i c st r i ng Name;
publ i c i mAccessRi ght Ri ght ;
}
wher e
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 83

Type = the type of ACL (see AclType on page 94)


Name = the name of the user or group
Right = imRightNone, imRightRead, imRightReadWrite, imRightAll
AdditionalProperty
When a default document profile is created on a folder, the profile properties are stored as
name-value pairs in the AdditionalProperties collection on the folder. The format for the
attribute name is IMan___ (three underscores) plus the attribute ID of the field.
publ i c cl ass Addi t i onal Pr oper t y
{
publ i c st r i ng Name;
publ i c st r i ng Val ue;
}
wher e
Name = the string value of a property (IMan___ plus the attribute ID)
Value = the value of the property
CustomProperty
publ i c cl ass Cust omPr oper t y
{
publ i c i mFol der At t r i but eI D At t r i but eI D;
publ i c st r i ng Val ue;
}
wher e
AttributeID =the attribute ID of a folder property (see imFolderAttributeID on page 95)
Value =the value of the property
CustomAttribute
publ i c cl ass Cust omAt t r i but e
{
publ i c i mPr of i l eAt t r i but eI D At t r i but eI D; / / C1 - C12 & C29 C30
publ i c st r i ng Al i as;
publ i c st r i ng Descr i pt i on;
publ i c st r i ng Par ent Al i as;
Chapter 4: WorkSite Web Service
84 WorkSite Web Application Integration Toolkit Developers Guide

publ i c bool Enabl ed;


}
wher e
AttributeID =the attribute ID of the custom property (see imProfileAttributeID on page 96)
Alias =the alias for the new custom property
Description =the description for the new custom property
ParentAlias =the parent alias of the new custom property. For example, you add a new custom2
property for a custom1. The Par ent Al i as is the Alias of custom1.
Enabled =true or false, depending on whether the property should be enabled immediately after
its added
Document
publ i c cl ass Document
{
publ i c st r i ng Obj ect I D;
publ i c st r i ng Dat abase; / / Read Onl y
publ i c byt e[ ] Cont ent ;
publ i c Pr of i l eI t em[ ] Pr of i l e;
publ i c Obj ect Secur i t y Secur i t y;
publ i c Hi st or yI t em[ ] Hi st or y; / / Read Onl y
}
wher e
ObjectID = the moniker of the document
Database = the database name (read-only)
Content = the actual content of the document as a byte array
Profile = an array of one or more profile items of type Pr of i l eI t em(see ProfileItem on
page 90)
Security = the security setting or ACL of the document (see AclItem on page 82.)
History = a read-only array of one or more document history items of type Hi st or yI t em(see the
HistoryItem on page 87.)
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 85

DocumentFolder
publ i c cl ass Document Fol der
{
publ i c st r i ng Obj ect I D;
publ i c st r i ng Name;
publ i c st r i ng Descr i pt i on;
publ i c st r i ng Emai l Pr ef i x;
publ i c st r i ng Par ent I D; / / Read Onl y
publ i c bool I sRoot Level Fol der ; / / Read Onl y
publ i c st r i ng[ ] SubFol der s;
/ / Read Onl y. Onl y SubFol der I Ds one l evel deep.
publ i c st r i ng[ ] Cont ent s;
/ / Read Onl y. Onl y Document I Ds one l evel deep.
publ i c Cust omPr oper t y[ ] Cust omPr oper t i es;
/ / Cur r ent l y onl y Cust om1, Cust om2 and Cust om3.
publ i c Addi t i onal Pr oper t y[ ] Addi t i onal Pr oper t i es;
publ i c Obj ect Secur i t y Secur i t y;
publ i c i mObj ect Type Type; / / Read Onl y.
}
wher e
ObjectID = the moniker of the document folder
Name = the name of the document folder
Description = the description of the document folder
EmailPrefix = the configurable portion of the e-mail address preceding the @ symbol
ParentID = Read-only. The moniker of the parent folder, e.g., the workspace to which the folder
was added
IsRootLevelFolder = Read only. Boolean. True if the folder is the root.
Contents = Read only. Monikers of documents one level under the folder (does not include
contents of subfolders).
CustomProperties = Custom1, Custom2 and Custom3
AdditionalProperties = an array of user-defined string properties (see AdditionalProperty on
page 83)
Security = the security settings on the document folder (see AclItem on page 82)
Type = Read-only. The folder type (DocumentFolder, Tab, WorkSpace)
Chapter 4: WorkSite Web Service
86 WorkSite Web Application Integration Toolkit Developers Guide

Error
publ i c cl ass Er r or
{
publ i c st r i ng Message;
publ i c Pr of i l eEr r or [ ] Pr of i l eEr r or s;
}
wher e
Message = the text of the error message
ProfileErrors = an array of profile errors (see ProfileError on page 89)
FolderSearchParameter
publ i c cl ass Fol der Sear chPar amet er
{
publ i c i mFol der At t r i but eI D At t r i but eI D;
publ i c st r i ng Sear chVal ue;
}
wher e
AttributeID = the attribute ID of a workspace/folder property used as a search parameter (see
imFolderAttributeID on page 95)
SearchValue = the value of the property to be matched during the search
FullTextSearch
publ i c cl ass Ful l Text Sear ch
{
publ i c i mFul l Text Sear chLocat i on Sear chLocat i on;
publ i c st r i ng Sear chVal ue;
}
wher e
SearchLocation = the enumerated value of the location to be searched in a full-text search (see
imFullTextSearchLocation on page 96)
SearchValue = the string to be matched during the search
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 87

HistoryItem
Hi st or yI t emrefers to an operation that occurred in the history of a document, e.g., the
document was opened, checked out, or checked in. Each Hi st or yI t emhas the following
parameters:
publ i c cl ass Hi st or yI t em
{
publ i c st r i ng User ;
publ i c st r i ng Number ;
publ i c st r i ng Comment ;
publ i c st r i ng Ver si on;
publ i c st r i ng Locat i on;
publ i c st r i ng Oper at i on;
publ i c st r i ng Appl i cat i on;
publ i c i nt Dur at i on;
publ i c i nt PagesPr i nt ed;
publ i c Dat eTi me Dat e;
}
wher e
User = the user who performed the operation
Number = the document number of the document
Comment = the users comment when performing the operation, e.g., an entry in the Comment
field of the Document Profile dialog during checkin
Version = the version number of the document
Location = the location of the document
Operation = a description of the operation performed on the document
Application = the application used to perform the operation
Duration = the length of time to perform the operation
PagesPrinted = the number of pages printed during the operation
Date = the date of the operation
NewWorkspace : Workspace
publ i c cl ass NewWor kspace : Wor kspace
{
Chapter 4: WorkSite Web Service
88 WorkSite Web Application Integration Toolkit Developers Guide

publ i c Not i f i cat i on Not i f i cat i on;


publ i c st r i ng Templ at eI D;
}
wher e
Notification = the e-mail message sent to users who have access to the new workspace (see
Notification on page 88)
TemplateID = the moniker of the workspace template used to create the new workspace
Notification
When user notification is enabled, the users who have access to the workspace receive a
notification when the workspace is created.
publ i c cl ass Not i f i cat i on
{
publ i c Reci pi ent [ ] Reci pi ent s;
publ i c st r i ng Subj ect ;
publ i c st r i ng Message;
}
Where
Recipients = an array of users who are recipients of the e-mail notification (see Recipient on
page 90)
Subject = the Subject line of the e-mail
Message = the body of the e-mail message
ObjectSecurity
publ i c cl ass Obj ect Secur i t y
{
publ i c bool I ncl udeExt er nal User sI nDef aul t Secur i t y;
publ i c bool Ext er nal l yVi si bl e;
publ i c bool I nher i t ed;
publ i c Acl I t em[ ] Acl ;
publ i c i mSecur i t yType Def aul t Vi si bi l i t y;
}
wher e
IncludeExternalUsersInDefaultSecurity = Boolean. When True, external users have access to
the object.
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 89

ExternallyVisible = Boolean. When True, the object is visible to external users.


Inherited = Boolean. When True, the Default Security (i mSecur i t yType) and ACL are inherited
from the parent.
Acl = a list of users or groups that have access rights to the object (see AclItem on page 82)
OutputMask
To set the value of the OutputMask in the input message, select the properties you want the Web
service to return in the output message and add the enumerated values. For example, to include
Profile (1), Security (2), DocumentContent (4), and History (8), set the value (1 +2 +4 +8) =
15.
[ Fl ags]
publ i c enumOut put Mask
{
Pr of i l e = 1,
Secur i t y = 2,
Document Cont ent = 4,
Hi st or y = 8,
Cust omPr oper t i es = 16,
Addi t i onal Pr oper t i es = 32,
SubFol der s = 64,
Fol der Cont ent = 128
}
ProfileError
Pr of i l eEr r or identifies the erroneous or suspect profile field that caused the error, and provides
a description of the error and a numeric Er r or Code.
publ i c cl ass Pr of i l eEr r or
{
publ i c st r i ng Message;
publ i c i mPr of i l eAt t r i but eI D At t r i but eI D;
}
wher e
Message = the text of the error message including a description of the error and a numeric error
code
AttributeID = the attribute ID of the erroneous profile property (see imProfileAttributeID on
page 96)
Chapter 4: WorkSite Web Service
90 WorkSite Web Application Integration Toolkit Developers Guide

ProfileItem
publ i c cl ass Pr of i l eI t em
{
publ i c i mPr of i l eAt t r i but eI D At t r i but eI D;
publ i c st r i ng Val ue;
}
wher e
AttributeID = the attribute ID of a profile property (see imProfileAttributeID on page 96)
Value = the value of the property
ProfileSearchParameter
publ i c cl ass Pr of i l eSear chPar amet er
{
publ i c i mPr of i l eAt t r i but eI D At t r i but eI D;
publ i c st r i ng Sear chVal ue;
}
wher e
AttributeID = the attribute ID of a property used as a search parameter (see
imProfileAttributeID on page 96
SearchValue = the value of the property to be matched during the search
Recipient
When user notification is enabled, the users who have access to the workspace are notified when
the workspace is created. They are the recipients.
publ i c cl ass Reci pi ent
{
publ i c Acl Type Type;
publ i c st r i ng Name;
}
wher e
Type = the type of ACL (see AclType on page 94)
Name = the name of the user or group
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 91

WorkSpace
publ i c cl ass Wor kspace
{
publ i c st r i ng Obj ect I D;
publ i c st r i ng Dat abase; / / Read Onl y
publ i c st r i ng Name;
publ i c st r i ng Descr i pt i on;
publ i c st r i ng SubType;
publ i c st r i ng Cat egor y;
publ i c i nt Fol der I D; / / Read Onl y.
publ i c st r i ng[ ] SubFol der s;
/ / Read Onl y. Appl i es onl y t o Fol der I Ds one l evel bel ow r oot .
publ i c Cust omPr oper t y[ ] Cust omPr oper t i es;
/ / Onl y Cust om1, Cust om2 and Cust om3 ar e cur r ent l y suppor t ed.
publ i c Addi t i onal Pr oper t y[ ] Addi t i onal Pr oper t i es;
publ i c Pr of i l eI t em[ ] Pr of i l e;
publ i c Obj ect Secur i t y Secur i t y;
}
wher e
ObjectID = the moniker of the workspace
Database = the name of the database that contains the workspace
Name = the name of the workspace
Description = the description of the workspace
SubType = a string constant used to distinguish different types of workspaces, e.g., "start" for
Start workspace, "template" for workspace template, or "work" for a regular workspace
Category = the category defined when the workspace was created
FolderID = Read-only. The moniker of the workspace folder object.
SubFolders = an array of one or more folder IDs one level below the workspace
CustomProperties = Custom1, Custom2, and Custom3
AdditionalProperties = an array of user-defined string properties (see AdditionalProperty on
page 83)
Profile = an array of one or more profile items (see ProfileItem on page 90)
Security = the security settings on the workspace (see AclItem on page 82)
Chapter 4: WorkSite Web Service
92 WorkSite Web Application Integration Toolkit Developers Guide

WSObject
publ i c cl ass WSObj ect
{
publ i c st r i ng Name;
publ i c st r i ng Descr i pt i on;
publ i c st r i ng Emai l Pr ef i x;
publ i c st r i ng Par ent I D;
publ i c st r i ng Obj ect I D;
publ i c st r i ng Dat abase;
publ i c Cont ent Cont ent ;
publ i c Pr of i l eI t em[ ] Pr of i l e;
publ i c Obj ect Secur i t y Secur i t y;
publ i c Hi st or yI t em[ ] Hi st or y;
publ i c bool I sRoot Level Fol der ;
publ i c st r i ng[ ] SubFol der s; / / Onl y SubFol der I D' s 1 l evel deep
publ i c st r i ng[ ] Cont ent s; / / Onl y Document I D' s 1 l evel deep.
publ i c Cust omPr oper t y[ ] Cust omPr oper t i es; / / Onl y Cust om1 , 2 and 3 f or now.
publ i c Addi t i onal Pr oper t y[ ] Addi t i onal Pr oper t i es;
publ i c i mObj ect Type Type;
publ i c st r i ng SubType;
publ i c st r i ng Cat egor y;
publ i c i nt Fol der I D;
}
Where
Name =the name of the WorkSite item
Description =the description of the WorkSite item
EmailPrefix =the configurable portion of the e-mail address preceding the @ symbol
NOTE
Applicable only if the WorkSite item is a document folder.
ParentID =The moniker of the parent of the WorkSite item
NOTE
Applicable only if the WorkSite item is a document folder.
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 93

ObjectID =the moniker of the WorkSite item


Database =the database name where this WorkSite item resides
Content =the actual content of the document as a byte array
NOTE
Applicable only if the WorkSite item is a document.
Profile =an array of one or more profile items of type ProfileItem (see ProfileItem on
page 90)
NOTE
Applicable only if the WorkSite item is a Workspace or a document
Security =the security setting or ACL of the document (see ObjectSecurity on page 88)
History =an array of one or more document history items. (see HistoryItem on page 87)
NOTE
Applicable only if the WorkSite item is a document
IsRootLevelFolder =True if the folder is the root
NOTE
Applicable only if the WorkSite item is a document folder.
SubFolders =an array of folder monikers one level below the WorkSite item
NOTE
Applicable only if the WorkSite item is a document folder or a workspace.
Contents =an array of document monikers one level below the WorkSite item
NOTE
Applicable only if the WorkSite item is a document folder.
CustomProperties =Custom1, Custom2, and Custom 3 values for the WorkSite item
Chapter 4: WorkSite Web Service
94 WorkSite Web Application Integration Toolkit Developers Guide

NOTE
Applicable only if the WorkSite item is a document folder or workspace.
AdditionalProperties =an array of user-defined string properties for the WorkSite item
NOTE
Applicable only if the WorkSite item is a document folder or workspace.
Type =WorkSite item type (Document, Workspace, DocumentFolder)
SubType =a string constant used to distinguish different types of workspaces. For example,
"start" for Start workspace, "template" for workspace template, or "work" for a regular
workspace.
NOTE
Applicable only if the WorkSite Item is a workspace.
Category =the category defined when the workspace was created.
NOTE
Applicable only if the WorkSite Item is a workspace.
FolderID =the moniker of the workspace folder object.
NOTE
Applicable only if the WorkSite Item is a workspace.
Enumerators
WorkSite enumerators are valid values that can be entered in attribute fields. Below are lists of
valid enumerators for properties accepted by the WorkSite Web service.
AclType
publ i c enumAcl Type
{
User = ' u' ,
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 95

Gr oup = ' g'


}
imAccessRight
publ i c enumi mAccessRi ght
{
i mRi ght None = 0,
i mRi ght Read = 1,
i mRi ght ReadWr i t e = 2,
i mRi ght Al l = 3,
}
imCheckOutOptions
publ i c enumi mCheckOut Opt i ons
{
i mDont Repl aceExi st i ngFi l e = 0,
i mRepl aceExi st i ngFi l e = 1,
}
imFolderAttributeID
publ i c enumi mFol der At t r i but eI D
{
i mFol der I D = 0,
i mFol der Par ent I D = 1,
i mFol der Def aul t Secur i t y = 2,
i mFol der Name = 3,
i mFol der Owner = 4,
i mFol der Descr i pt i on = 5,
i mFol der Locat i on = 6,
i mFol der Type = 7,
i mFol der Subt ype = 8,
i mFol der I nher i t s = 9,
i mFol der Pr of i l eI D = 10,
i mFol der Ver si on = 11,
i mFol der Cust om1 = 12,
i mFol der Cust om2 = 13,
i mFol der Cust om3 = 14,
i mFol der Root Fol der I D = 15,
i mFol der Root Fol der Type = 16,
i mFol der I sCont ent Sear ch = 17,
i mFol der I sFol der Sear ch = 18,
Chapter 4: WorkSite Web Service
96 WorkSite Web Application Integration Toolkit Developers Guide

i mFol der Emai l = 19,


i mFol der Hi ddenOnDeskt op = 20,
}
imFullTextSearchLocation
publ i c enumi mFul l Text Sear chLocat i on
{
i mFul l Text Anywher e = 0,
i mFul l Text Comment = 1,
i mFul l Text Descr i pt i on = 2,
i mFul l Text Body = 3,
i mFul l Text Comment Descr i pt i on = 4,
imProfileAttributeID
publ i c enumi mPr of i l eAt t r i but eI D
{
i mPr of i l eDat abase = 0,
i mPr of i l eDocNum= 1,
i mPr of i l eVer si on = 2,
i mPr of i l eDescr i pt i on = 3,
i mPr of i l eName = 4,
i mPr of i l eAut hor = 5,
i mPr of i l eOper at or = 6,
i mPr of i l eType = 7,
i mPr of i l eCl ass = 8,
i mPr of i l eSubCl ass = 9,
i mPr of i l eEdi t Dat e = 10,
i mPr of i l eCr eat eDat e = 11,
i mPr of i l eRet ai nDays = 12,
i mPr of i l eSi ze = 13,
i mPr of i l eI ndexabl e = 14,
i mPr of i l eI sRel at ed = 15,
i mPr of i l eLocat i on = 16,
i mPr of i l eDef aul t Secur i t y = 17,
i mPr of i l eLast User = 18,
i mPr of i l eI nUseBy = 19,
i mPr of i l eNet Node = 20,
i mPr of i l eI nUse = 21,
i mPr of i l eCheckedOut = 22,
i mPr of i l eAr chi ved = 23,
i mPr of i l eComment = 24,
i mPr of i l eCust om1 = 25,
i mPr of i l eCust om2 = 26,
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 97

i mPr of i l eCust om3 = 27,


i mPr of i l eCust om4 = 28,
i mPr of i l eCust om5 = 29,
i mPr of i l eCust om6 = 30,
i mPr of i l eCust om7 = 31,
i mPr of i l eCust om8 = 32,
i mPr of i l eCust om9 = 33,
i mPr of i l eCust om10 = 34,
i mPr of i l eCust om11 = 35,
i mPr of i l eCust om12 = 36,
i mPr of i l eCust om13 = 37,
i mPr of i l eCust om14 = 38,
i mPr of i l eCust om15 = 39,
i mPr of i l eCust om16 = 40,
i mPr of i l eCust om17 = 41,
i mPr of i l eCust om18 = 42,
i mPr of i l eCust om19 = 43,
i mPr of i l eCust om20 = 44,
i mPr of i l eCust om21 = 45,
i mPr of i l eCust om22 = 46,
i mPr of i l eCust om23 = 47,
i mPr of i l eCust om24 = 48,
i mPr of i l eCust om25 = 49,
i mPr of i l eCust om26 = 50,
i mPr of i l eCust om27 = 51,
i mPr of i l eCust om28 = 52,
i mPr of i l eCust om29 = 53,
i mPr of i l eCust om30 = 54,
i mPr of i l eCust om1Descr i pt i on = 60,
i mPr of i l eCust om2Descr i pt i on = 61,
i mPr of i l eCust om3Descr i pt i on = 62,
i mPr of i l eCust om4Descr i pt i on = 63,
i mPr of i l eCust om5Descr i pt i on = 64,
i mPr of i l eCust om6Descr i pt i on = 65,
i mPr of i l eCust om7Descr i pt i on = 66,
i mPr of i l eCust om8Descr i pt i on = 67,
i mPr of i l eCust om9Descr i pt i on = 68,
i mPr of i l eCust om10Descr i pt i on = 69,
i mPr of i l eCust om11Descr i pt i on = 70,
i mPr of i l eCust om12Descr i pt i on = 71,
i mPr of i l eCust om29Descr i pt i on = 72,
i mPr of i l eCust om30Descr i pt i on = 73,
i mPr of i l eAut hor Descr i pt i on = 74,
i mPr of i l eOper at or Descr i pt i on = 75,
i mPr of i l eTypeDescr i pt i on = 76,
i mPr of i l eCl assDescr i pt i on = 77,
Chapter 4: WorkSite Web Service
98 WorkSite Web Application Integration Toolkit Developers Guide

i mPr of i l eSubCl assDescr i pt i on = 78,


i mPr of i l eLast User Descr i pt i on = 79,
i mPr of i l eI nUseByDescr i pt i on = 80,
i mPr of i l eEdi t Ti me = 81,
i mPr of i l eExt ensi on = 82,
i mPr of i l eFul l Text = 83,
i mPr of i l eSubType = 84,
i mPr of i l eEdi t Pr of i l eTi me = 85,
i mPr of i l eCont ai ner I D = 89,
i mPr of i l eCust om31 = 96,
i mPr of i l eMar kedFor Ar chi ve = 97,
i mPr of i l eEchoEnabl ed = 98,
i mPr of i l eAccessTi me = 99,
i mPr of i l eMessageUni queI D = 100,
i mPr of i l eI sExt er nal = 101,
i mPr of i l eHasAt t achment = 102,
i mPr of i l eExt er nal AsNor mal = 103,
i mPr of i l ePr oj ect I t emSI D = 104,
i mPr of i l ePr oj ect I t emPar ent SI D = 105,
i mPr of i l eCheckout Pat h = 106,
i mPr of i l eCheckout DueDat e = 107,
i mPr of i l eCheckout Comment s = 108,
i mPr of i l eCheckout When = 109,
i mPr of i l eQui ckRet r i eve = 110,
i mPr of i l eFr ozen = 111,
}
imSearchAttributeType
publ i c enumi mSear chAt t r i but eType
{
i mSear chI D = 1,
i mSear chFul l Name = 2,
i mSear chBot h = 3,
i mSear chExact Mat ch = 4,
}
imSearchEmail
publ i c enumi mSear chEmai l
{
i mSear chEmai l Or Document s = 0,
i mSear chEmai l Onl y = 1,
i mSear chDocument sOnl y = 2,
}
Using Web Methods
WorkSite Web Application Integration Toolkit Developers Guide 99

imSecurityType
publ i c enumi mSecur i t yType
{
i mPubl i c = 80,
i mVi ew = 86,
i mPr i vat e = 88,
}
}
Chapter 4: WorkSite Web Service
100 WorkSite Web Application Integration Toolkit Developers Guide

WorkSite Web Application Integration Toolkit Developers Guide 101

Chapter 5
Workspace Creation Web Service
The Workspace Creation Web Service allows you to generate workspaces for the WorkSite
content management system from within another application. For example, within a law firm or
accounting enterprise, matters and accounts originate in the billing department. By referencing
the Workspace Creation Web Service in the firm's time and billing software application, you can
easily generate a workspace for each new matter or account and store the moniker within your
custom application.
Of course you can create workspaces within the WorkSite Web application itself. There are two
advantages to using the Workspace Creation Web Service. First, Web services use a standard
protocol of well-formed XML that is not platform-specific. Second, because the service is based
on the hypertext transfer protocol (HTTP), access is not restricted to a network. The Web service
can be consumed from any location.
Consuming the Web Service
By referencing the WorkSpace Creation Web Service in your custom application, you can
import the code for creating a WorkSite WorkSpace directly into your Visual Basic or C#project
within the Visual Studio.NET environment. You can enter values for the workspace attributes
and return a moniker that allows you to access the workspace from within your application.
To consume the WorkSpace Creation Web Service:
1. Open your application in Visual Studio.NET.
2. In the Solution Explorer pane, right-click References.
Chapter 5: Workspace Creation Web Service
102 WorkSite Web Application Integration Toolkit Developers Guide

Figure 7 Solution Explorer view


3. Select Add Web Reference. The Add Web Reference dialog opens.
4. Enter the URL of the Factory Web service:
http://<localhost>/worksite/services/factory.asmx
wher e
<l ocal host > i s t he name of t he Wor kSi t e Web Component Ser ver t o whi ch you ar e
connect ed.
5. Click Go. The Web service is downloaded from the WorkSite Web Component Server and
appears in the window, as shown below.
Consuming the Web Service
WorkSite Web Application Integration Toolkit Developers Guide 103

Figure 8 Add Web Reference dialog


NOTE
If you want to view the SOAP code for the Factory Web service, click CreateWorkspace.
The XML code will appear in the window. Click Service Description to view the XML
schema file for the Web service.
6. Click the Add Reference button to add the reference to your Visual Basic or C#project. The
reference appears as a new node in the Solution Explorer tree.
Chapter 5: Workspace Creation Web Service
104 WorkSite Web Application Integration Toolkit Developers Guide

Figure 9 Web reference appears in Solution Explorer


7. Open Form1 in Design view and drag a control onto the form, for example, a button
captioned Create WorkSpace.
8. Click the button to open the VB or C#code. Directly below the button_click event, enter the
following code to invoke the Web service within your application:
usi ng Syst em;
usi ng Syst em. Dr awi ng;
usi ng Syst em. Di agnost i cs;
usi ng Syst em. Col l ect i ons;
usi ng Syst em. Component Model ;
usi ng Syst em. Net ;
usi ng Syst em. Ref l ect i on;
usi ng Syst em. Wi ndows. For ms;
usi ng i Manage. Wor kSi t e. Web. Pr oxi es;
namespace i Manage. Wor kSi t e. Web. SDK_Har ness
{
/ / / <summar y>
/ / / Summar y descr i pt i on f or For m1.
/ / / </ summar y>
publ i c cl ass Mai nFor m: Syst em. Wi ndows. For ms. For m
{
pr i vat e Syst em. Wi ndows. For ms. TabPage cr eat ePageTab;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 3;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 4;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 5;
Consuming the Web Service
WorkSite Web Application Integration Toolkit Developers Guide 105

pr i vat e Syst em. Wi ndows. For ms. Text Box dat abaseTxt ;
pr i vat e Syst em. Wi ndows. For ms. Text Box nameTxt ;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 6;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 7;
pr i vat e Syst em. Wi ndows. For ms. ComboBox def aul t Secur i t yCombo;
pr i vat e Syst em. Wi ndows. For ms. Text Box descr i pt i onTxt ;
pr i vat e Syst em. Wi ndows. For ms. TabCont r ol t ab;
pr i vat e Syst em. Wi ndows. For ms. But t on execut eBt n;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 9;
pr i vat e Syst em. Wi ndows. For ms. Text Box t empl at eTxt ;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 2;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 10;
pr i vat e Syst em. Wi ndows. For ms. Text Box acl Txt ;
pr i vat e Syst em. Wi ndows. For ms. Text Box pr of i l eTxt ;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 11;
pr i vat e Syst em. Component Model . Cont ai ner component s = nul l ;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 1;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 12;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 13;
pr i vat e Syst em. Wi ndows. For ms. Text Box subj ect Txt ;
pr i vat e Syst em. Wi ndows. For ms. Text Box messageTxt ;
pr i vat e Syst em. Wi ndows. For ms. Text Box r eci pi ent sTxt ;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 14;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 15;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 16;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 17;
pr i vat e Syst em. Wi ndows. For ms. TabPage pi ngTab;
pr i vat e Syst em. Wi ndows. For ms. Label pi ngLbl ;
pr i vat e Syst em. Wi ndows. For ms. Text Box baseUr l Txt ;
pr i vat e Syst em. Wi ndows. For ms. Text Box passwor dTxt ;
pr i vat e Syst em. Wi ndows. For ms. Text Box user NameTxt ;
pr i vat e Syst em. Wi ndows. For ms. Text Box domai nTxt ;
pr i vat e Syst em. Wi ndows. For ms. Label l abel 22;
pr i vat e Syst em. Wi ndows. For ms. Text Box cr eat ePageTxt ;
pr i vat e Syst em. Wi ndows. For ms. Label dur at i onLbl ;
publ i c Mai nFor m( )
{
/ /
/ / Requi r ed f or Wi ndows For mDesi gner suppor t
/ /
I ni t i al i zeComponent ( ) ;
}
/ / / <summar y>
/ / / Cl ean up any r esour ces bei ng used.
Wi ndows For mDesi gner gener at ed code
Chapter 5: Workspace Creation Web Service
106 WorkSite Web Application Integration Toolkit Developers Guide

/ / / </ summar y>


pr ot ect ed over r i de voi d Di spose( bool di sposi ng )
{
i f ( di sposi ng )
{
i f ( component s ! = nul l )
{
component s. Di spose( ) ;
}
}
base. Di spose( di sposi ng ) ;
}
+

/ / / <summar y>
/ / / The mai n ent r y poi nt f or t he appl i cat i on.
/ / / </ summar y>
[ STAThr ead]
st at i c voi d Mai n( )
{
Appl i cat i on. Run( new Mai nFor m( ) ) ;
}
pr i vat e Connect i on _connect i on;
pr i vat e Connect i on connect i on
{
get
{
i f ( _connect i on == nul l )
{
i f ( user NameTxt . Text ! = nul l &&
_user NameTxt . Text . Lengt h > 0 )
{
connect i on = new Connect i on( baseUr l Txt . Text ,
_user NameTxt . Text , passwor dTxt . Text ,
domai nTxt . Text ) ;
}
el se
{
connect i on = new Connect i on( baseUr l Txt . Text ) ;
}
}
r et ur n _connect i on;
}
Consuming the Web Service
WorkSite Web Application Integration Toolkit Developers Guide 107

set
{
_connect i on = val ue;
}
}
pr i vat e voi d pi ng_Cl i ck( obj ect sender , Syst em. Event Ar gs e)
{
Dat eTi me st ar t = Dat eTi me. Now;
pi ngLbl . Text = connect i on. Echo. Pi ng( "Hel l o Wor l d" ) ;
dur at i onLbl . Text = ( Dat eTi me. Now - st ar t ) . ToSt r i ng( ) ;
}
pr i vat e voi d execut eBt n_Cl i ck( obj ect sender ,
Syst em. Event Ar gs e)
{
i f ( t ab. Sel ect edTab == cr eat ePageTab )
{
cr eat ePage_Cl i ck( sender , e) ;
}
el se i f ( t ab. Sel ect edTab == pi ngTab )
{
pi ng_Cl i ck( sender , e) ;
}
}
pr i vat e voi d cr eat ePage_Cl i ck( obj ect sender ,
Syst em. Event Ar gs e)
{
Dat eTi me st ar t = Dat eTi me. Now;
st r i ng[ ] acl Li nes = acl Txt . Text . Spl i t ( ' \ n' ) ;
Acl I t em[ ] acl I t ems = new Acl I t em[ acl Li nes. Lengt h] ;
f or ( i nt i = 0; i < acl I t ems. Lengt h; i ++ )
{
st r i ng[ ] acl St r = acl Li nes[ i ] . Spl i t ( ' , ' ) ;
Acl I t emacl I t em= new Acl I t em( ) ;
acl I t em. Type = ( Acl Type) Enum. Par se( t ypeof ( Acl Type) ,
_acl St r [ 0] . Tr i m( ) ) ;
acl I t em. Name = acl St r [ 1] . Tr i m( ) ;
acl I t em. Ri ght = ( i mAccessRi ght ) Enum. Par se
_( t ypeof ( i mAccessRi ght ) , acl St r [ 2] . Tr i m( ) ) ;
acl I t ems[ i ] = acl I t em;
}
Chapter 5: Workspace Creation Web Service
108 WorkSite Web Application Integration Toolkit Developers Guide

st r i ng[ ] pr of i l eLi nes = pr of i l eTxt . Text . Spl i t ( ' \ n' ) ;


Pr of i l eI t em[ ] pr of i l eI t ems =
new Pr of i l eI t em[ pr of i l eLi nes. Lengt h] ;
f or ( i nt i = 0; i < pr of i l eLi nes. Lengt h; i ++ )
{
st r i ng[ ] pr of i l eSt r = pr of i l eLi nes[ i ] . Spl i t ( ' , ' ) ;
pr of i l eI t ems[ i ] = new Pr of i l eI t em( ) ;
pr of i l eI t ems[ i ] . At t r i but eI D = ( i mPr of i l eAt t r i but eI D)
Enum. Par se( t ypeof ( i mPr of i l eAt t r i but eI D) ,
pr of i l eSt r [ 0] . Tr i m( ) ) ;
pr of i l eI t ems[ i ] . Val ue = pr of i l eSt r [ 1] . Tr i m( ) ;
}
Not i f i cat i on not i f i cat i on = new Not i f i cat i on( ) ;
not i f i cat i on. Subj ect = subj ect Txt . Text ;
not i f i cat i on. Message = messageTxt . Text ;
st r i ng[ ] r eci pi ent Li nes = r eci pi ent sTxt . Text . Spl i t ( ' \ n' ) ;
Reci pi ent [ ] r eci pi ent s =
new Reci pi ent [ r eci pi ent Li nes. Lengt h] ;
f or ( i nt i = 0; i < r eci pi ent s. Lengt h; i ++ )
{
st r i ng[ ] r eci pi ent St r = r eci pi ent Li nes[ i ] . Spl i t ( ' , ' ) ;
r eci pi ent s[ i ] = new Reci pi ent ( ) ;
r eci pi ent s[ i ] . Type = ( Acl Type) Enum. Par se
( t ypeof ( Acl Type) , r eci pi ent St r [ 0] . Tr i m( ) ) ;
r eci pi ent s[ i ] . Name = r eci pi ent St r [ 1] . Tr i m( ) ;
}
not i f i cat i on. Reci pi ent s = r eci pi ent s;
Pr of i l eEr r or [ ] pr of i l eEr r or s;
st r i ng pageI D = connect i on. Fact or y. Cr eat ePage(
dat abaseTxt . Text ,
t empl at eTxt . Text ,
nameTxt . Text ,
descr i pt i onTxt . Text ,
st r i ng. Empt y,
( i mSecur i t yType) Enum. Par se( t ypeof ( i mSecur i t yType) ,
def aul t Secur i t yCombo. Text ) ,
acl I t ems,
pr of i l eI t ems,
not i f i cat i on,
out pr of i l eEr r or s
) ;
Reference
WorkSite Web Application Integration Toolkit Developers Guide 109

i f ( pr of i l eEr r or s ! = nul l )
{
st r i ng er r or Log = st r i ng. Empt y;
f or each( Pr of i l eEr r or er r or i n pr of i l eEr r or s)
{
i f ( er r or ! = nul l )
{
er r or Log += er r or . At t r i but eI D + " : " +
er r or . Message + " \ n" ;
}
}
cr eat ePageTxt . Text = er r or Log;
}
el se
{
cr eat ePageTxt . Text = pageI D;
}
dur at i onLbl . Text = ( Dat eTi me. Now - st ar t ) . ToSt r i ng( ) ;
}
pr i vat e voi d r eset Connect i on( obj ect sender , Syst em. Event Ar gs e)
{
connect i on = nul l ;
}
}
Reference
Description
Web Service Name: Factory
URL: ht t p: / / l ocal host / wor ksi t e/ ser vi ces/ f act or y. asmx
WSDL: ht t p: / / l ocal host / wor ksi t e/ ser vi ces/ f act or y. asmx?wsdl
Authentication: The Factory Web Service client must authenticate with the Web Server (IIS)
using one of the following methods: Basic, Digest, NTLM, Kerberos, Certificates. The
authenticated account must exist in WorkSite and must be able to do Trusted Login.
Chapter 5: Workspace Creation Web Service
110 WorkSite Web Application Integration Toolkit Developers Guide

Methods
CreatePage
Creates a new WorkSpace in a specified database.
Input
database (string) Name of the database where the new WorkSpace will be created.
template (string) Moniker of the WorkSpace template used. The template must be from
the database in which the new WorkSpace will be created.
name (string) Name for the new WorkSpace.
description (string) Description for the new WorkSpace.
category (string, optional) Category classification selected for the new WorkSpace.
defaultSecurity (string) Default security setting for the new WorkSpace. Must be one of the
following: imPrivate, imPublic or imView. For more information, see i mSecur i t yType
enumerator in the COM Object for WorkSite Developers Guide.
aclItems (array of Acl I t emelements) Collection of users and groups and their explicit security
privileges for the new WorkSpace.
profileItems (array of Pr of i l eI t emelements) Collection of profile attribute values applied to
the new WorkSpace.
notification (structure, optional) An invitational e-mail message that will be sent to a list of
users after the new WorkSpace is created with a link to the WorkSpace.
Output
Return value (string) Moniker of the newly created WorkSpace or empty string if there are
some profile errors.
profileErrors (arrays of Pr of i l eEr r or elements) Collection of profile errors corresponding to
all invalid profile attributes values.
Reference
WorkSite Web Application Integration Toolkit Developers Guide 111

Structures
AclItem
Specifies a user or group entity and its security privilege. This structure has the following fields:
Type (string) The type of this entity. Must be one of the following: User or Group.
Name (string) Name of the user or group.
Right (string) The effective access this entity would have on the new WorkSpace. Must be
one of the following: i mRi ght None, i mRi ght Read, i mRi ght ReadWr i t e or i mRi ght Al l . For
more information, see i mAccessRi ght enumerator in the COM Object for WorkSite
Developers Guide.
ProfileItem
Specifies a custom attribute value applied to the workspace profile. This structure has the
following fields:
AttributeID (string) Identifies the custom attribute. Must be one of the following:
imProfileCustom1, imProfileCustom2, and so on.
For more information, see i mPr of i l eAt t r i but eI D enumerator in the COM Object for
WorkSite Developers Guide.
Value (string) The actual value of the custom attribute.
Notification (structure)
An invitational e-mail message with a link to the workspace that will be sent to a list of users
and/or groups when the new workspace is created. This structure has the following fields:
Recipients (array of recipient elements) Collection of users and groups that should receive
the message.
Subject (string) Subject of the e-mail message.
Message (string) Custom message that will be included in the e-mail.
Recipient (structure)
Individual recipient of the notification message. This structure has the following fields:
Type (string) The type of this entity. Must be one of the following: User or Group.
Name (string) Name of the user or the group.
Chapter 5: Workspace Creation Web Service
112 WorkSite Web Application Integration Toolkit Developers Guide

ProfileError
Individual error returned as the result of an invalid profile value. This structure has the
following fields:
AttributeID (string) Identifies the custom attribute. Must be one of the following:
imProfileCustom1, imProfileCustom2, and so on.
For more information, see i mPr of i l eAt t r i but eI D enumerator in the COM Object for
WorkSite Developers Guide.
Message (string) Error message associated with the invalid value.