idm web services toolkit for windows idm web services toolkit for... · idm web services toolkit...

44
Version 19.2 rev2 IDM Web Services Toolkit for Windows Technical Reference

Upload: others

Post on 18-Jul-2020

81 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Version 19.2 rev2

IDM Web Services Toolkit for Windows

Technical Reference

Page 2: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Notices

PUBLISHERThis document is published anddistributed by Vignette Corporation. It wasdesigned and produced using FrameMakerpublishing software.

VERSIONIDM Web Services Toolkit for WindowsTechnical Reference, version 19.2 rev2(Publication Date: 23 September 2005)

DISCLAIMERVignette does not warrant, guarantee, ormake representations concerning thecontents of this document. All informationis provided "AS-IS," without express orimplied warranties of any kind including,without limitation, the warranties ofmerchantability, fitness for a particularpurpose, quality and title.

Any information provided by Vignettecustomers or partners was obtained afterthe implementation of Vignette softwareand may have changed as of thePublication Date. You may not achieve thesame results or benefits from usingVignette as described in this document.Nothing in this document is considered tobe part of any product documentation orspecification for any purpose. Vignettereserves the right to change the contentsof this document and the features or

functionalities of its products and servicesat any time without obligation to notifyanyone of such changes.

COPYRIGHT AND TRADEMARKS

Copyright 2005 Vignette Corporation. Allrights reserved. Vignette, the V Logo,e:fficiency and e:fficiency experts aretrademarks or registered trademarks ofVignette Corporation in the United Statesand other countries. All other company,product, and service names and brandsare the trademarks or registeredtrademarks of their respective owners.

SEND US YOUR COMMENTS

If you have comments or suggestions aboutthis manual, please send them to thisaddress:

[email protected]

A member of the Publications team willacknowledge your mail as soon aspossible.

You can also reach us at the followingaddress:

Vignette CorporationPublications Department1301 South MoPac Expressway, Suite 100Austin, TX 78746USA

ACKNOWLEDGEMENTSMicrosoft is a registered trademark and Windows is a trademark of the Microsoft Corporation. US Patent No 4974159.

Unix is a registered trademark of Unix Systems Laboratories Inc.

Microsoft Management Console (MMC), Copyright 1997, Microsoft Corporation. All Rights Reserved.

Framemaker is a registered trademark of Adobe Systems Incorporated.

© 2005 Vignette Corporation. All rights reserved.ii

Page 3: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Table of Contents

Chapter 1. Introduction 1Overview 1

What are web services? 1Architecture 2

Data tier - IDM Repository 2Business tier - Application Server, Web Server 2Presentation tier - Web browser 2Deployment variations 3

Chapter 2. Configuring IDM Web Services: Repository component 5Introduction 5Configuration 6

Connection pooling configuration 6System configuration 6Setup of remoting objects 6Tracing 9

Advanced configuration 11

Chapter 3. Configuring IDM Web Services: Application server component 13Introduction 13Configuration 14

Tracing 14Advanced configuration 15

Load balancing configuration 15Renderer configuration 16Cache configuration 17Error configuration 17

Chapter 4. Configuring IDM Web Services: Web server component 19Introduction 19Configuration 20

v19.2 rev2 iiiIDM Web Services Toolkit for Windows Technical Reference

Page 4: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Table of Contents

Advanced configuration 20Web service timeout configuration 21

Chapter 5. Applet Viewer for IDM Web Services Toolkit 23Introduction 23Architecture 24Configuring JAI Support 25

Configuration of the applet viewer 25Developing applications using the applet viewer 30

Sharing and storage of ticket in the Session object of the web server 30Loading the applet viewer 30Loading an image into an existing instance of the applet viewer 31Tying things together 31

Common Issues 34JRE 34Large TIFF Images 34

Using the applet viewer 35Viewer applet toolbar 35Annotations 36Viewer applet context menu 38Multi-page documents 39Subpages 39

© 2005 Vignette Corporation. All rights reserved.iv v19.2 rev2

Page 5: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Chapter

1

Introduction

OverviewThe IDM Web Services Toolkit for Windows is a product that allows users to develop applications that interface with the IDM Repository using web based standards and protocols.

This technical reference provides an overview of the product and post-installation configuration instructions.

What are web services?A web service can be described simply as programmable application logic accessible using standard Internet protocols. A web service can be thought of as a reusable web component and can be implemented on any platform using any programming language. Applications can be constructed using multiple web services from various sources that work together regardless of where they reside or how they are implemented.

Below is a list of technologies used and their purpose, when used for building or utilizing web services.

• Extensible Markup Language (XML) is a standard used to represent data used by a web service, with XML Schemas used to describe the data types.

• Simple Object Access Protocol (SOAP) is the communications protocol for web services. SOAP is a specification that defines the XML format for messages but is also used to represent program data as XML and also how to do Remote Procedure Calls (RPC). SOAP messages are exchanged over the Hypertext Transfer Protocol (HTTP).

• A Web Services Description Language (WSDL) file is an XML document that describes a set of SOAP messages and how the messages are exchanged. A WSDL file is a contract between a web service consumer and the web service. As WSDL is XML, it is readable and editable but in most cases, it is generated and utilized by the software.

v19.2 rev2 1IDM Web Services Toolkit for Windows Technical Reference

Page 6: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

1Chapter

ArchitectureApplications written with the IDM Web Services Toolkit for Windows will follow the n-tier architecture consisting of presentation, business and data tiers. The following diagram depicts this architecture.

Data tier - IDM RepositoryThe data tier consists of the IDM Repository, which manages the storage and indexing of documents. Access to IDM Repository from the business tier is achieved through IDM Web Services Repository Objects. The remote process call mechanism between the data tier and business tier is dependent on the deployment platform - CORBA for UNIX-based platforms and .NET Remoting for Windows platforms.

Business tier - Application Server, Web ServerThe business tier consists of an application server and a web server.

The application server hosts the actual web services - exposing the IDM Web Services Toolkit for Windows API. Details of the API can be found in the IDM Web Services Toolkit for Windows API Reference. The web services toolkit can utilize a Windows Rendering Server for document rendering.

Custom web applications or web pages are hosted on the web server and are capable of using the IDM Web Services Toolkit for Windows API exposed on the application server. Communication between these two machines is through SOAP over HTTP.

Presentation tier - Web browserThe presentation tier consists of a web browser, running on a machine connected to the internet.

Browser

Web Server

Application Server

IDM Repository

Custom Web Pages (ASP)

IDM Web Services

IDM Web Services Toolkit

Repository Objects

HTTP

SOAP/

HTTP

RPC/TCP

Windows

Rendering Server

HTTP

Presentation tier

Business tier

Data tier

© 2005 Vignette Corporation. All rights reserved.2 v19.2 rev2

Page 7: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Introduction

A browser would access a web application simply by connecting to the web server and requesting for web pages using the HTTP protocol. Typically, plug-ins, Java applets or ActiveX controls are not required at the browser end to operate the web application.

Deployment variationsTypically not all deployments will or can follow the configuration shown in the architecture diagram, that is, using individual machines for the different tiers. The architecture is flexible enough to allow variations in the deployment of the product. Typically it is the business tier where deployments can vary. The following are two examples of deployment configurations:

Example 1• One machine configured as the IDM Repository and application server

• One machine configured as the web server

• One machine configured as a Windows Rendering Server

Example 2• One machine configured as IDM Repository

• One machine configured as application server and web server

• One machine configured as a Windows Rendering Server

v19.2 rev2 3IDM Web Services Toolkit for Windows Technical Reference

Page 8: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

1Chapter

© 2005 Vignette Corporation. All rights reserved.4 v19.2 rev2

Page 9: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Chapter

2

Configuring IDM Web Services: Repository component

IntroductionThis chapter describes the post-installation configuration of the software components of the IDM Web Services Toolkit for Windows Repository Objects that run on the IDM Repository machine.

Before proceeding further, it is important to understand the following terms:

Remoting object An IDM Web Services Toolkit for Windows remoting object is typically a dynamic linked library (DLL) that utilizes .NET remoting technology and contains the business logic. The .NET remoting technology is a form of remote process communication mechanism that allows objects or processes to communicate across process or machine boundaries using the .NET framework. The functionality in a remoting object can only be utilized if the remoting object has been hosted.

Remoting host In IDM Web Services Toolkit for Windows, the remoting host is implemented as an executable. Each remoting host should host a single remoting object.

v19.2 rev2 5IDM Web Services Toolkit for Windows Technical Reference

Page 10: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

2Chapter

ConfigurationConnection pooling configuration

If the IDM Repository is configured to use an Oracle or SQL Server database, ensure that connection pooling is enabled by following the steps below:

1. Open up the “Data Sources (ODBC)” control panel. This is located in Start > Settings > Control Panel > Administrative Tools > Data Sources (ODBC).

2. Select the “Connection Pooling” tab.

3. Locate the relevant database ODBC driver – for Oracle it is “Oracle in OraHome92”, for SQL Server it is “SQL Server”. Double-click on the selected driver and a dialog should appear. Ensure that “Pool connections to this driver” is selected. Leave the unused time period at the default value of 60 seconds. Apply these changes.

System configurationIn the System folder of IDM System Administration, there are two variables related to sessions. These variables are set to their default values and can be modified according to custom requirements.

IDM Repository: Ticket alive period (in mins)The time a ticket must exist before it can timeout or is considered for cleanup. This setting is measured in minutes with a default minimum value of 1 minute.As the consequence of this variable, if the user logs off and then on again the number of logged-in users will not decrease immediately; refreshing the frame that displays the number of current users after “ticket_alive_interval” will decrease the number.

IDM Repository: Ticket timeout period (in mins)The period of inactivity of tickets before tickets will timeout. This setting is measured in minutes with a default value of 60 minutes.

NOTE: Here ticket refers to a successful login session.

In the Install folder of IDM System Administration, there are two configuration variables that control queue connection recovery in the queue remoting host.

Number of connection retriesSpecify the number of retries a queue remoting host will perform to re-establish a connection to a queue manager. The default value is zero.

Time between connection retries (in secs)Specify the time interval in which a queue remoting host will wait between connection attempts to a queue manager. The default value is 1 second.

NOTE: These two settings affect other IDM products including IDM Client and IDM SystemAdministration.

Setup of remoting objects1. Login to IDM Repository as the instance user.

© 2005 Vignette Corporation. All rights reserved.6 v19.2 rev2

Page 11: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Configuring IDM Web Services: Repository compo-

2. Add a Windows system environment variable named imagestore. Set this to the IDM Repository hostname or IP address. This variable must be set before starting up the remoting objects on the IDM Repository.

3. Add the remoting object port numbers to the file $CTL_RUNTIME_DIR/is/config/services:

rlogin 9500/tcp # Login services remoting objectrdb 9510/tcp # Data services remoting objectrdoc 9520/tcp # Retrieval services remoting objectrimport 9530/tcp # Import services remoting objectrmisc 9540/tcp # Miscellaneous services remoting objectrannot 9590/tcp # Annotations remoting objectrqueue 9595/tcp # Queue services remoting object

NOTE: Use tabs to space the columns. Do not use spaces or other characters.

NOTE: If the Web Services Toolkit on a particular IDM Repository is to be used to accessqueues on a different IDM Repository, these queue systems and ports must be defined inthe $CTL_RUNTIME_DIR/is/config/services file on both servers.

These internal remoting service port numbers must be unique on the server (regardless of the IDM Repository instance or type of process). If they are not unique assign different port numbers.

These service port numbers are classified as “internal” because they are used exclusively on the IDM Repository. No external processes will communicate on these ports.

NOTE: If any of the port numbers in the $CTL_RUNTIME_DIR/is/config/services file needs tobe changed, then the honcho service must be restarted for the changes to take effect.

4. Ensure that the remoting hosts are configured with the external service port numbers.

For every remoting host, there is a corresponding configuration file, installed in $CTL_RUNTIME_DIR/is/system directory.

The remoting hosts, their configuration files and default port numbers are listed below:

Remoting host

Configuration file Default portnumber

ttnloginhost ttnloginhost.exe.config 9000

ttndbhost ttndbhost.exe.config 9010

ttndochost ttndochost.exe.config 9020

ttnimporthost ttnimporthost.exe.config 9030

ttnmischost ttnmischost.exe.config 9040

ttnannothost ttnannothost.exe.config 9090

ttnqueuehost ttnqueuehost.exe.config 9105

v19.2 rev2 7IDM Web Services Toolkit for Windows Technical Reference

Page 12: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

2Chapter

These port numbers are exposed and are external to IDM Repository. The external service port number is contained in the <channel> XML tag within the remoting host configuration file. For example:

<channel ref="tcp" port="9020"> ... </channel>

NOTE: If the repository services need to be tunnelled through a firewall, then the firewallneeds to be configured to allow communication through these ports.

All the remoting hosts except ttnloginhost and ttnqueuehost utilise the services provided by the other remoting hosts.

For example, ttndbhost, ttndochost, ttnimporthost , ttnmischost, and ttnannothost use the services provided by ttnloginhost. Therefore, the external port number for the service ttnloginhost must be defined in the configuration file (using the <client> XML tag) for the remoting hosts ttndbhost, ttndochost, ttnimporthost , ttnmischost, and ttnannothost.

In the example below, the remoting host being configured requires the services of the login remoting object, which is listening on the local machine on external port number 9000.

<client><wellknown type="Towertech.Common.RemotingInterface.ITTRLogin, ttnRemotingInterface" url="tcp://localhost:9000/Login" /></client>

Starting Remoting HostsThe honcho process can start and stop the Remoting Hosts automatically when the IDM Repository is started and shutdown. To do this, use IDM System Administration to add the processes to the STARTUP file:

1. Start IDM System Administration

2. Select IDM Configuration Management

3. Click on Custom Folder

4. Click on Startup List

5. Add new entries for the following, if they do not already exist:

ttnloginhostttndbhostttndochostttnimporthostttnmischostttnannothostttnqueuehost

6. Restart the IDM Repository instance to start the Remoting Hosts.

NOTE: If using the IDM Database, the IDM Repository instance or instances of ttndbhostMUST be restarted after dropping either an index or a table from the database.

NOTE: The IDM Repository instance(s) of ttnmischost MUST be restarted after adding anew custom event or modifying an existing custom event.

© 2005 Vignette Corporation. All rights reserved.8 v19.2 rev2

Page 13: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Configuring IDM Web Services: Repository compo-

TracingAll trace files are located in $CTL_RUNTIME_DIR/is/log. Errors will be written to the trace file and the errorlog ($CTL_RUNTIME_DIR/is/log/errorlog). The trace file names and their locations are not configurable.

A feature of the tracing facility is the ability to set trace levels to control the amount of tracing information output to all the trace files. The trace level feature is governed by a configuration variable in the System folder of IDM System Administration, called IDM Repository: Trace Level (MAX, HIGH, MEDIUM, LOW, MIN). The default setting is MAX. This variable refers to the severity of logged records. Therefore MAX means “maximum severity” (effectively errors) and MIN refers to minimum severity (all available trace messages).

The trace level configuration variable accepts the following values:

MAX Only errors are traced and errors are always logged

HIGH High severity trace messages

MEDIUM Medium severity trace messages

LOW Low severity trace messages

MIN Debug mode showing function entry and exit

This should only be changed if there are problems that need to be diagnosed.

Remoting object trace filesThese are trace files for information generated by the remoting objects. Remoting objects are those components that expose an interface to the IDM Repository. The name of these trace files begin with a lowercase ‘r’.

Tracing information will be recorded in the following files:

rlogin This log contains tracing related to allocation, deallocation and verification of licenses.

rdoc This log contains tracing related to retrieval of documents.

rimport This log contains tracing related to the importing of documents.

rdb This log contains tracing related to the database operations.

rmisc This log contains tracing related to system configuration and application list.

rannot This log contains tracing related to storage and retrieval of annotations.

rqueue This log contains tracing related to queue session registrations and queue connection retries.

Low level component trace filesThese are trace files for information generated by lower level components, which are used by the remoting objects. The name of these trace files begin with a lowercase ‘m’.

These trace files should only be enabled if there is no corresponding remoting object trace file or if more detailed information is required.

Tracing information will be recorded in the following files:

mlogon This log contains tracing of low level operations related to license management.

mdb This log contains tracing related to database operations including each SQL statement issued to the database.

v19.2 rev2 9IDM Web Services Toolkit for Windows Technical Reference

Page 14: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

2Chapter

mdoc This log contains tracing of low level operations related to retrieval of documents.

mmisc This log contains tracing related to general operations such as retrieval of application lists and retrieval of configuration variables.

mimport This log contains tracing of low level operations related to the importing of documents.

mannot This log contains tracing of low level operations related to storage and retrieval of annotations.

mqueue This log contains tracing of low level queue related operations.

© 2005 Vignette Corporation. All rights reserved.10 v19.2 rev2

Page 15: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Configuring IDM Web Services: Repository compo-

Advanced configurationThis section describes how to configure IDM Web Services Toolkit for Windows .NET Repository to run more than one instance of a particular service.

For example, consider the situation where an extra document retrieval remoting service is desired to improve the response time of document retrieval. The steps to perform this configuration are similar to those explained in the previous sections.

1. Select the particular service to be duplicated. Do not select the login service, as there can only be one instance of the login service running at a time. The remaining options are data, document retrieval, importing, miscellaneous services, and queue services.

2. Make a copy of the remoting host and its configuration file. In a Korn shell, enter:

cd $CTL_RUNTIME_DIR/is/systemcp ttndochost.exe ttndochost2.execp ttndochost.exe.config ttndochost2.exe.config

3. Change the external remoting object port number in the remoting host configuration file from:

<channel ref="tcp" port="9020">

to:

<channel ref="tcp" port="9021">

All other settings in the remoting host configuration file should remain unchanged. The remoting host trace filename can be changed, if desired.

4. Add an internal remoting service port in $CTL_RUNTIME_DIR/is/config/services. For example:

rdoc2 9521/tcp Second Retrieval Services Remoting Object

5. Add a command entry in $CTL_RUNTIME_DIR/is/config/HANDLERS. (Note that this is the customisable HANDLERS file located under the config subdirectory rather than admin.)

ttndochost2 8 ttndochost2 –s rdoc2

This can also be done via the IDM System Administration / IDM Configuration Management snap-in.

6. Add a “run” command in $CTL_RUNTIME_DIR/is/config/STARTUP to automatically start up this second service.

run ttndochost2

This can also be done via the IDM System Administration / IDM Configuration Management snap-in.

7. Stop and restart the IDM Repository instance to start up the remoting services.

v19.2 rev2 11IDM Web Services Toolkit for Windows Technical Reference

Page 16: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

2Chapter

© 2005 Vignette Corporation. All rights reserved.12 v19.2 rev2

Page 17: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Chapter

3

Configuring IDM Web Services: Application server component

IntroductionThis chapter describes the configuration of the software components required on the application server.

For a typical system, the procedures described in the following subsections should be performed. Some components may not be used, or there may be no need to change the factory defaults. In these cases, the corresponding subsection can be skipped after checking its applicability.

v19.2 rev2 13IDM Web Services Toolkit for Windows Technical Reference

Page 18: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

3Chapter

Configuration1. Note down the IP address of the Application Server machine in use.

2. Create the virtual directory.

Using Internet Information Services (IIS) Manager, create a virtual directory with a chosen name, for example IDMWSAppServer, as a subdirectory of the default web site. Set the physical path to the installation directory of the application server, and accept the default settings.

3. If your organisation utilises a proxy server for Internet access, perform the following:

In Internet Options on the Control Panel, select the Connections tab, then click the LAN Settings... button. Make sure that the Bypass proxy server for local addresses field is selected and the appropriate IP addresses are entered.

4. Test the web services by doing the following:

Start a new web browser and enter the following URL:

http://<IP address of Application Server>/<Virtual Directory name>/ttsysservices.asmx

Verify that a list of functions is listed in the browser. This test verifies that the installation of web services has been successful.

5. Edit the web services configuration file (web.config, located in the installation directory of the application server) with information regarding external port numbers on which remoting objects are listening, as well as the IP address of the IDM Repository.

NOTE: Web Services configuration is based on cascading web.config feature. ThereforeIDM Web Services web.config file contains entries that are only relevant to IDM WebServices, AppletPak contains entries relevant only to Applet Viewer and so forth.

For example:

<add key="Remoting.type.0.instance.0.url" value="tcp://<IP address of IDM Repository>:<remoting object TCP port number>/Login" />

More information can be found in the section “Advanced configuration” on page 15.

TracingTracing can be enabled to aid in debugging and support of the web service components. Trace files are located in the IDM Repository server in the $CTL_RUNTIME_DIR/is/log directory.

The trace files to create are as follows:

• Sysservices - contains information related to the TTSysServices web service method invocations such as login, logout and retrieval of configuration variables.

• Docservices - contains information related to the TTDocServices web service method invocations such as document retrieval and document deletion.

© 2005 Vignette Corporation. All rights reserved.14 v19.2 rev2

Page 19: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Configuring IDM Web Services: Application server

Advanced configurationThe configuration file for web services is located in <install directory of application server>/web.config.

Load balancing configuration

Remoting.type.countThis variable is used to specify the number of unique remoting object types being used.

Example:

<add key="Remoting.type.count" value="3"/>

The statement above means that there are three unique remoting object types.

Remoting.type.[0-n]This variable is used to specify the type of a remoting object.

Example:

<add key="Remoting.type.0" value="Towertech.Common.RemotingInterface.ITTRLogin"/>

The above statement means remoting object type zero is of type Towertech.Common.RemotingInterface.ITTRLogin. Usually this does not need to be changed.

Remoting.type.[0-n].dllnameThis variable is used to specify the name of the dynamic link library that the remoting object type can be found in.

Example:

<add key="Remoting.type.0.dllname" value="ttnRemotingInterface"/>

The above statement means that the remoting object type zero can be found in ttnRemotingInterface.dll. Usually this does not need to be changed.

Remoting.type.[0-n].instance.countThis variable is used to specify the number of the same remoting object types that are running.

Example:

<add key="Remoting.type.0.instance.count" value="2"/>

The above statement means that there will be two instances of the remoting object type Remoting.type.0 running.

Remoting.type.[0-n].instance.[0-n].urlThis variable is used to specify the URL where each instance of the remoting object is located.

Example:

<add key="Remoting.type.0.instance.0.url" value="tcp://localhost/9000/Login"/>

The above statement means that remoting object type zero and the first instance of this type can be accessed at tcp://localhost/9000/Login. The IP address of the IDM Repository must be specified.

v19.2 rev2 15IDM Web Services Toolkit for Windows Technical Reference

Page 20: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

3Chapter

Renderer configuration

Renderer manager configurationThe Renderer Manager is a component of the Windows Rendering Web Services product. Refer to the Vignette Rendition Server Technical Reference for further information. The Renderer Manager is used by the IDM Web Services Toolkit for Windows for on-the-fly renditioning of documents.

The configuration of the renderer manager is controlled by the TTRepEpoWS.RendererManager.RenderManagerService variable. The value of this variable is a URL to the Renderer Manager. The default value needs to be changed but in most cases only the IP address needs to be modified. Enter the IP address of the Render Manager in the following section in the application server configuration file located at <Application Server Installation Directory>/web.config.

<appSettings><!-- The URL of the Renderer Manager --> <add key="TTRepEpoWS.RendererManager.RenderManagerService" value="http://<IP address of Render Manager>:<Render Manager web server port>/RenderManager/RenderManager.dll?Handler=Default"/>

Configuration of this variable is not required if on-the-fly renditioning of documents is not required.

Renderer cache configurationThe renderer cache uses these variables:

Renderer.retry The number of retries to try to obtain a Renderer Agent Reference.

Renderer.retryIntervalSleeping interval (in seconds) in between retries.

Renderer type configurationThese variables define the classes that perform the rendering conversion for each specified file extension:

Renderer.AFP Specifies the name of the renderer type that converts AFP byte streams to PNG byte streams.

Renderer.PCL Specifies the name of the renderer type that converts PCL byte streams to PNG byte streams.

Renderer.EPS Specifies the name of the renderer type that converts PS byte streams to PNG byte streams.

Renderer.TIF Specifies the name of the renderer type that converts TIFF byte streams to PNG byte streams.

Renderer.DOC Specifies the name of the renderer type that converts DOC byte streams to PNG byte streams.

Renderer.XLS Specifies the name of the renderer type that converts XLS byte streams to PNG byte streams.

The renderer type must be one of the following:

1. AFPRenderer - used to render AFP files.

2. PCLRenderer - used to render PCL files.

3. PSRenderer - used to render PostScript files.

4. TIFRenderer - used to render TIF files.

5. OutInRenderer - used to render various Windows documents.

© 2005 Vignette Corporation. All rights reserved.16 v19.2 rev2

Page 21: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Configuring IDM Web Services: Application server

Rendering parameter translation table configurationThese variables define the corresponding names of rendering parameters between Tower IDM and the Windows Rendering Server:

HEIGHT Specifies the corresponding name of the Tower IDM HEIGHT rendering parameter as recognized by the Windows Rendering Server.

WIDTH Specifies the corresponding name of the Tower IDM WIDTH rendering parameter as recognized by the Windows Rendering Server.

ZOOMFACTOR Specifies the corresponding name of the Tower IDM ZOOMFACTOR rendering parameter as recognized by the Windows Rendering Server.

FORCE8BITS Specifies the corresponding name of the Tower IDM FORCE8BITS rendering parameter as recognized by the Windows Rendering Server.

CONVTYPE Specifies the corresponding name of the Tower IDM CONVTYPE rendering parameter as recognized by the Windows Rendering Server.

COLORON Specifies the corresponding name of the Tower IDM COLORON rendering parameter as recognized by the Windows Rendering Server.

Cache configuration

Renderer.CacheDirectoryThis variable specifies the location to cache the images retrieved from IDM Repository on the fly.

Example:

<add key="Renderer.CacheDirectory" value="c:/etc/tower/cache"/>

The statement above means that the images retrieved will be cached in c:/etc/tower/cache location.

IDMCache.CleanupIntervalThis variable specifies the time interval to cleanup the images in the cache that is not being used or had been time-out.

Example:

<add key="IDMCache.CleanupInterval" value="90"/>

The statement above means that time interval to cleanup the images in the cache is 90 seconds.

Error configuration

customErrorsThis variable controls the amount of exception/error information that is returned to clients that call the web service methods. This variable is a standard .NET configuration variable. The possible values are:

• “On” - Always display user-friendly messages. This does not show stack trace information.

v19.2 rev2 17IDM Web Services Toolkit for Windows Technical Reference

Page 22: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

3Chapter

• “Off” - Always display complete exception information. This setting is useful during development but should not be used during production.

• “RemoteOnly” - Display user-friendly messages if the client is not running on the local web server, otherwise return complete exception information.

© 2005 Vignette Corporation. All rights reserved.18 v19.2 rev2

Page 23: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Chapter

4

Configuring IDM Web Services: Web server component

IntroductionThe web server component is an ASP.NET-based demonstration client application utilizing web services. Its purpose is to demonstrate the usage of the IDM Web Services Toolkit for Windows on the .NET platform for professional service developers.

v19.2 rev2 19IDM Web Services Toolkit for Windows Technical Reference

Page 24: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

4Chapter

Configuration

NOTE: Ensure that the “Configuration” section from Chapter 3, “Configuring IDM WebServices: Application server component” has been completed first.

1. Note down the IP address of the Demo Client Web Server machine in use.

2. Create the virtual directory.

Using Internet Information Services (IIS) Manager, create a virtual directory with a chosen name, for example IDMWSWebServer, as a subdirectory of the default web site. Set the physical path to the installation directory of the web server, and accept the default settings.

3. Right click on the virtual directory and select Properties.

4. Click Configuration and select the Mappings tab.

5. Click on Add and enter the following information:

Executable: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dllExtension: .avpMethod: GET,HEAD,POST,DEBUGUncheck "Verify that file exists"

6. Apply all changes and dismiss all dialogs by clicking OK.

7. If your organisation uses a proxy server for Internet access, perform the following:

In Internet Options on the Control Panel, select the Connections tab, then click the LAN Settings... button. Make sure that the Bypass proxy server for local addresses field is selected and the appropriate IP addresses are entered, after which the Demo Client can be used.

Advanced configurationIf the Demo Client web server is being hosted on a different machine from the one hosting the web services, it will need to be configured to locate the web services from the different machine as follows.

If configuring the Demo Client web server with IDM Web Services Toolkit for Windows, change the following section in the web server configuration file located at <Demo Client Installation Directory>/web.config.

<appSettings><add key="TTEpoClient.TTApp.TTAppServices" value="http://<IP address of Application

Server>/<Virtual directory created on Application Server>/TTAppServices.asmx"/><add key="TTEpoClient.TTDoc.TTDocServices" value="http://<IP address of Application

Server>/<Virtual directory created on Application Server>/TTDocServices.asmx"/><add key="TTEpoClient.TTSys.TTSysServices" value="http://<IP address of Application

Server>/<Virtual directory created on Application Server>/TTSysServices.asmx"/><add key="TTEpoClient.TTQueue.TTQueueServices" value="http://<IP address of

Application Server>/<Virtual directory created on Application Server>/TTQueueServices.asmx"/></appSettings>

If configuring the Demo Client web server with IDM Web Services Toolkit for Unix, change the following section in the web server configuration file located at <Demo Client Installation Directory>/web.config and then enter the configuration as shown below"

<appSettings><add key="TTEpoClient.TTApp.TTAppServices" value="http://<hostname of Application

Server>:<port number of Application Server>/jboss-net/services/TTAppServices"/>

© 2005 Vignette Corporation. All rights reserved.20 v19.2 rev2

Page 25: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Configuring IDM Web Services: Web server compo-

<add key="TTEpoClient.TTDoc.TTDocServices" value="http://<hostname of Application Server>:<port number of Application Server>/jboss-net/services/TTDocServices"/><add key="TTEpoClient.TTSys.TTSysServices" value="http://<hostname of Application

Server>:<port number of Application Server>/jboss-net/services/TTSysServices"/><add key="TTEpoClient.TTQueue.TTQueueServices" value="http://<hostname of

Application Server>:<port number of Application Server>/jboss-net/services/TTQueueServices"/></appSettings>

Proceed to “Applet Viewer for IDM Web Services Toolkit” on page 23 if you are using the applet viewer for image viewing.

To test this configuration, open a browser and execute the following URL:

http://<IP address of Web Server>/<Virtual directory created on Web Server>/loginForm.aspx

A login form should be displayed.

NOTE: The IDM Web Services Windows Demo Client can be used in the following webbrowsers:

Microsoft Internet Explorer 6.0 SP1

Web service timeout configurationThe following is used to customise the timeout for web service API calls from the Demo Client web server. These are found in the file <Demo Client Installation Directory>/web.config.

TimeoutGeneralSpecifies the timeout period in milliseconds for all web services APIs except the image retrieval and import related APIs. The default setting is 100000 milliseconds.

TimeoutRetrieveSpecifies the timeout period in milliseconds for image retrieval related web service APIs. The default setting is 100000 milliseconds.

TimeoutImportSpecifies the timeout period in milliseconds for image import related web service APIs. The default setting is 100000 milliseconds

v19.2 rev2 21IDM Web Services Toolkit for Windows Technical Reference

Page 26: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

4Chapter

© 2005 Vignette Corporation. All rights reserved.22 v19.2 rev2

Page 27: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Chapter

5

Applet Viewer for IDM Web Services Toolkit

IntroductionThis optional component of the IDM Web Services Toolkit product allows developers to integrate a viewing application into their custom web application developed using the IDM Web Services Toolkit.

This chapter is intended for developers of custom web applications.

The viewing application is a Java-based component (called the applet viewer) that allows viewing of images retrieved from an IDM Repository. The applet viewer provides the following functionality:

• Support of TIFF, JPEG, PNG, and GIF file formats

• Display and saving of annotations

• Client based image zooming and rotation

• Viewing of sub-pages

v19.2 rev2 23IDM Web Services Toolkit for Windows Technical Reference

Page 28: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

5Chapter

ArchitectureThe following diagram describes how the applet viewer fits into an n-tier application developed using the IDM Web Services Toolkit.

Note that the applet viewer is downloaded from the customer web server when the custom web application is accessed.

Applet Viewer

Browser

IDM Repository

Web Services Server

IDM Web Services Toolkit

Applet Viewer ASPX/JSP pages

Applet Viewer Configuration File

Customer Web Server

HTTP

HTTP/SOAP

© 2005 Vignette Corporation. All rights reserved.24 v19.2 rev2

Page 29: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Applet Viewer for IDM Web Services Toolkit

Configuring JAI SupportJava Advanced Imaging (JAI) Support is software used by the applet viewer to help display TIFF and JPG images. The JAI software package is installed automatically if the applet viewer detects that it is not already available. To ensure that JAI support for the applet viewer is correctly downloaded, perform the following steps:

1. Change directory to <Web Server Installation Directory>\AppletPak\JRE

2. Open the file MANIFEST.MF for editing, and look for the line reading

jai-Implementation-URL: http://172.16.1.233/tower/jsp/jre/jai_win.jar

Change the URL to a value with the following convention:

http://<Web Server hostname or IP address>/<Web Server Installation Directory>/AppletPak/JRE/jar-win.jar

For example:

http://TestServer/WSDemoClient/AppletPak/JRE/jar-win.jar

If you do not want to use the default port number of 80, specify the custom port number as part of the custom web server hostname.

3. Change directory to <Web Server Installation Directory> and run the following command:

jar -ufm viewer/tdpviewer.jar jre/MANIFEST.MF

NOTE: For the above command to work, two options are available:

1. The Java SDK can be installed on the customer web server.2. MANIFEST.MF and tdpviewer.jar can be ftp-ed to a machine with Java SDK installed.

The second option requires storing tdpviewer.jar in the viewer directory and MANIFEST.MFin the jre directory. After running the command specified in step 3, the updatedtdpviewer.jar must be ftp-ed back to IIS server (ftp must be done in binary mode).

Configuration of the applet viewerTo configure Applet Viewer edit the file:<Web Server installation directory>\WSDemoClient\AppletPak\web.config

Web Services configuration is based on cascading web.config feature. Therefore IDM Web Services Toolkit web.config file contains entries that are only relevant to IDM Web Services, AppletPak contains entries relevant only to Applet Viewer and so forth.

The configuration must define at least the location of 2 web services: document and system settings related, as listed below:

<add key="av.TTDoc.TTDocServices" value="http://<IP address of Application Server>/<Virtual directory created on Application Server>/TTDocServices.asmx"/>

<add key="av.TTSys.TTSysServices" value="http://<IP address of Application Server>/<Virtual directory created on Application Server>/TTSysServices.asmx"/>

v19.2 rev2 25IDM Web Services Toolkit for Windows Technical Reference

Page 30: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

5Chapter

The following are descriptions of the configuration values used by the applet viewer:

Configuration variable Description

av.TraceSwitch This is a trace switch controlling the amount of tracing information output by the applet viewer web pages to the configured trace file. 1 = traces error messages only2 = traces errors and warnings3 = traces detailed error information4 = verbose trace informationDefault value of 1

av.TTDoc.TTDocServices This is a URL to the TTDocServices web service. A valid URL must be entered for this variable.Default value (example)http://ttw2000/IDMWSAppServer/TTDocServices.asmx

av.TTSys.TTSysServices This is a URL to the TTSysServices web service. A valid URL must be entered for this variable.Default value (example)http://ttw2000/IDMWSAppServer/TTSysServices.asmx

av.TimeoutSysWS This sets the timeout value for a TTSysServices web service request in milliseconds.Default value of 10000 ms.

av.TimeoutDocWS This sets the timeout value for a TTDocServices web service request in milliseconds. This value can be increased for situations where image retrieval is taking longer than expected but application response may suffer.Default value of 10000 ms.

av.traceFile The name and location of trace file used by the applet viewer web pages.Default value of C:\tmp\appletviewer.log

av.props.display This variable controls how the image is displayed within the applet viewer window.0=Original image size1=Fit to width2=Fit to height3=Fit to windowOther values = Original image sizeDefault value of 0.

av.props.extractrgn Enables or disables the extract region button in the applet viewer toolbar. The button should be disabled as this functionality is not available.0 = disabled1 = enabledDefault value of 0.

© 2005 Vignette Corporation. All rights reserved.26 v19.2 rev2

Page 31: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Applet Viewer for IDM Web Services Toolkit

av.props.blankrgn Enables or disables the blank region button in the applet viewer toolbar. The button should be disabled as this functionality is not available.0 = disabled1 = enabledDefault value of 0.

av.props.emailfax Enables or disables the email/fax button in the applet viewer toolbar. The button should be disabled as this functionality is not available.0 = disabled1 = enabledDefault value of 0.

av.props.docexport Enables or disables the document export button in the applet viewer toolbar. The button should be disabled as this functionality is not available.0 = disabled1 = enabledDefault value of 0.

av.props.maxsubpages Configures the maximum number of sub-pages that can be displayed for a particular page.Default value of 10 sub-pages.

av.props.maxzoomheight The maximum zoom height of image (in pixels).Default value of 1200 pixels.

av.props.maxzoomwidth The maximum zoom width of image (in pixels).Default value of 1200 pixels.

av.props.minzoomheight The minimum zoom height of image (in pixels).Default value of 100 pixels.

av.props.minzoomwidth The minimum zoom height of image (in pixels).Default value of 100 pixels.

av.props.imagetype Controls the type of image displayed in the applet viewer - that is color, grayscale or black and white.color = as a color imagegray = as a grayscale imagemono = blank and white imageDefault value of color.

av.props.highlights Defines the number of highlight buttons in the applet viewer annotation toolbar.Default value of 4.

av.props.highlight.color.n Color property of the nth highlight definition.

av.props.highlight.translucency.n Translucency property of the nth highlight definition. Possible values are OPAQUE or TRANSLUCENT.

Configuration variable Description

v19.2 rev2 27IDM Web Services Toolkit for Windows Technical Reference

Page 32: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

5Chapter

av.props.underlines Defines the number of underline buttons in the applet viewer annotation toolbar.Default value of 2.

av.props.underline.color.n Color property of the nth underline definition.

av.props.underline.width.n Width property of the nth underline definition in pixels. This controls the thickness of the underline. Default value of 32 pixels.

av.props.stickynotes Defines the number of sticky notes buttons in the applet viewer annotation toolbar.Default value of 3.

av.props.stickynote.color.n Color property of the nth sticky note definition.

av.props.stickynote.maxnumchar.n Maximum number of characters property of the nth sticky note definition. This controls the number of characters allowed in a sticky note. Default value of 1024 characters.

av.props.margincomments Defines the number of margin comment buttons in the applet viewer annotation toolbar.Default value of 2.

av.margincomment.color.n Color of the nth margin comment definition.

av.props.margincomment.font.n Font property of the nth margin comment definition. Possible values are TIMESROMAN and SERIF.

av.props.margincomment.charheight.n Character height property of the nth margin comment definition in points. Default value of 240 points.

av.props.margincomment.style.n Style property of the nth margin comment definition.

av.props.freehands Defines the number of freehand buttons in the applet viewer annotation toolbar.Default value of 3.

av.props.freehand.color.n Color property of the nth freehand definition.

av.props.freehand.width.n Width property of the nth freehand definition in pixels. This controls the thickness of the freehand. Default value of 32 pixels.

av.props.ellipses Defines the number of ellipses buttons in the applet viewer annotation toolbar.Default value of 2.

av.props.ellipse.color.n Color property of the nth ellipse definition.

Configuration variable Description

© 2005 Vignette Corporation. All rights reserved.28 v19.2 rev2

Page 33: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Applet Viewer for IDM Web Services Toolkit

NOTES:

Settings for line width and character height are provided for compatibility with other IDM products only; they have no effect in the applet viewer.

Available color names are the standard Java color names: BLACK, BLUE, CYAN, DARKGRAY, GRAY, GREEN, LIGHTGRAY, MAGENTA, ORANGE, PINK, RED, WHITE and YELLOW. Colors can also be specified as RGB values, in the form "<red value>.<green value>.<blue value>", where each value lies in the range 0-255. For example, "0.0.0" is black and "255.255.255" is white.

av.props.ellipse.width.n Width property of the nth ellipse definition in pixels. This controls the thickness of the ellipse. Default value of 32 pixels.

av.props.smoothshape Enables or disables anti-aliasing of images when zooming.0 = disable1 = enableDefault value of 1.

av.props.showsavedialog Enables or disables notification to save annotations if annotations have not been saved.0 = disable1 = enableDefault value of 1.

av.props.loadzoomdialog Enables or disables the zoom factor dialog for TIFF images. This setting is not available in the applet viewer package.0 = disable1 = enableDefault value of 1.

av.plugin.tcc Sets the web page used for loading and viewing web-capture documents.Default value of TccPlugIn.aspx. This variable should not be modified.

Configuration variable Description

v19.2 rev2 29IDM Web Services Toolkit for Windows Technical Reference

Page 34: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

5Chapter

Developing applications using the applet viewer

In order to use the applet viewer within the custom web application you need to perform the following steps:

1. Sharing and storage of ticket in the Session object of the web server

2. Loading the applet viewer

3. Loading an image into an existing instance of the applet viewer

4. Tying things together

Sharing and storage of ticket in the Session object of the web server

The applet viewer web pages utilize the IDM Web Services Toolkit API for retrieval of images and retrieval and saving of annotations. In order to function correctly, these web pages need access to the current ticket. As the applet viewer does not log into the IDM Repository, it assumes that the custom web application will and that this ticket is stored in the Session object of the web server with an index value of "ticket".

For example, each web service invocation by the applet viewer web pages, are performed as follows:

string ticket = (string)Session["ticket"]; // retrieve ticket

Validate the ticket using isValid() // validate ticket

Call relevant web service method // invoke web service

Session["ticket"] = ticket; // store new ticket

Your custom web application should follow a similar coding strategy.

Loading the applet viewerLoading the applet viewer is a case of invoking a particular web page with an appropriate query string. That particular web page is called "ViewerApplet.aspx". The required and optional query parameters for this page are:

Required ParametersappnameThe IDM Application of the requested document

ifnThe IFN of the requested document in SSN/DS-ID format

Optional Parameterspg

The number of the page to display. This value should be in the range of 1 to number pages in the document. The default value is 1.

npages

The total number of pages in the requested document. If this parameter is not supplied, this value will be automatically determined. This particular parameter enables/disables the next page/previous page/goto page toolbar buttons.

If this parameter is supplied, then this value will be used regardless of the actual number of pages. For example, npages can be set to 97 even if the document contains only 15 pages.

© 2005 Vignette Corporation. All rights reserved.30 v19.2 rev2

Page 35: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Applet Viewer for IDM Web Services Toolkit

ExamplesAssume that ifn 2/6-1 has 4 pages.

http://testserver/customApp/AppletPak/Server/Viewer/ViewerApplet.aspx?appname=demo&ifn=2/6-1&npages=4&pg=2

This example will load the second page of 2/6-1 with the next page/previous page/goto toolbar buttons enabled.

http://testserver/customApp/AppletPak/Server/Viewer/ViewerApplet.aspx?appname=demo&ifn=2/6-1

This example will load the first page of 2/6-1 with the next page/previous page/goto toolbar buttons enabled.

Loading an image into an existing instance of the applet viewer

The downloading of the applet viewer every time an image is retrieved can result in wasted bandwidth but more importantly, unacceptable application response. In most cases, it is desirable to download the applet viewer once and load subsequent images into the existing instance of the applet viewer. Again, to do this, it is a case of invoking the appropriate web page with an appropriate query string. This particular web page is named "ImageLoader.aspx" and the query parameters are the same as those for ViewerAppplet.aspx described in point 2.

Exampleshttp://testserver/customApp/AppletPak/Server/Misc/ImageLoader.aspx?appname=demo&ifn=2/6-1&npages=4&pg=2

This example will load the second page of 2/6-1 with the next page/previous page/goto toolbar buttons enabled.

http://testserver/customApp/AppletPak/Server/Misc/ImageLoader.aspx?appname=demo&ifn=2/6-1

This example will load the first page of 2/6-1 with the next page/previous page/goto toolbar buttons enabled.

Tying things togetherWhile points 2 and 3 describe how to load the initial and subsequent images into the applet viewer, some javascript is required to tie these two steps together in a custom web application for seamless operation.

The first thing to understand is that the result of the invocation of ViewerApplet.aspx is a HTML page with the applet viewer tags embedded inside. Additionally there are two frames in this HTML page - one frame to contain and display the applet viewer and another invisible frame that is used to invoke the applet viewer to load subsequent images.

The loading of the subsequent images into the applet viewer is achieved by changing the location property of the second invisible frame with an invocation to the ImageLoader.aspx page. This step is best illustrated with a commented example from the IDM Web Services Demo Client.

In ResultsForm.aspx, there is a small javascript function called OpenAppletWindow() shown below:

// checks whether the specified window has the applet

// viewer loaded. Returns true or false.function isAppletWindow(win)

v19.2 rev2 31IDM Web Services Toolkit for Windows Technical Reference

Page 36: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

5Chapter

{if (win && win.open && !win.closed && win.frames.length >= 2 && win.frames[0] != null){ // If the location property of the first frame // contains 'ViewerApplet', then the applet is loadedframeLocation = win.frames[0].location.toString();if (frameLocation.indexOf("ViewerApplet") != -1){return true;}}return false;}// open a new child window for the applet viewer// the code behind associates the onClick event with this function// for each of the titles displayed. Essentially when a user clicks on a// title, this function is called. Therefore the loading of the applet// viewer is initiated from the browser and not from the web server.function openAppletWindow(queryStr){// queryStr is constructed by the code behind of ResultsForm.aspx// because it has details about the document such as appname and ifnvar loadAppletUrl = 'AppletPak/Server/Viewer/ViewerApplet.aspx?' + queryStr;var nextImageUrl = 'AppletPak/Server/Misc/ImageLoader.aspx?' + queryStr;var win;var appletViewerOpen = false;

// loop through the child windows of this page and // locate the applet viewer window.for (i = 0; i < _arrayWin.length; i++){win = _arrayWin[i];

// check whether the window has the applet viewer

// loaded

appletViewerOpen = isAppletWindow(win);

if (appletViewerOpen)

{

break;

}

}

if (!appletViewerOpen){// no applet viewer window has been opened_arrayWin[_arrayWin.length] = window.open(loadAppletUrl);}else{// an applet viewer window has been opened so// load the image into the existing applet// the loading of the image is achieved by changing// the location of the second frame in the applet page

win.frames[1].location = nextImageUrl;}return false;

© 2005 Vignette Corporation. All rights reserved.32 v19.2 rev2

Page 37: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Applet Viewer for IDM Web Services Toolkit

}

NOTE: The above code only works with Microsoft Internet Explorer.

v19.2 rev2 33IDM Web Services Toolkit for Windows Technical Reference

Page 38: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

5Chapter

Common IssuesJRE

The applet viewer requires the presence of the Sun Java Runtime Environment (version 1.4.1_03 or later) on the user's PC in order to function. Ideally this should already be installed but if it is not installed, the user will be prompted to download and install the Sun JRE 1.4.1_03 plug-in. The plug-in will be downloaded from AppletPak/JRE/jre-win.exe on the customer web server. If an earlier version of the Sun Java Runtime Environment is installed on the user's PC it is recommended that this be uninstalled and version 1.4.1_03 or later installed in its place.

NOTE:

In some cases, the download of the Sun JRE may not have the required AuthentiCode. Ifthis occurs, the browser settings must be changed to allow the download of unsignedActiveX controls, or an error message will be displayed. The browser setting only needs tobe enabled for the download, and once the JRE has been downloaded successfully, thesetting should be changed back to disabled.

The system administrator can supply the AuthentiCode for the JRE themselves, in whichcase the browser setting is irrelevant. In this configuration, the user will be prompted todownload the Sun JRE plug-in every time a document is selected until the Sun JRE isinstalled.

A message "Unsupported document type" will be displayed in the applet's status bar if a document's format is not supported by JRE/JAI (only GIF, TIFF, PNG, and JPEG are supported).

The viewer applet supports the English and German languages. The required language must be installed on the machine and the Windows locale must be set to the appropriate country.

Large TIFF ImagesWhen the applet viewer is used to view a TIFF image, best efforts are made to display the image as close as possible to its original size. If the image viewed is too large, a JVM "out of memory" exception may be thrown.

The larger the image, the longer it will take to appear on screen. If this exception is being thrown, it can be resolved by increasing the amount of memory available to the JVM. This can be done by setting minimum and maximum heap limit for the JVM.

To do this:

1. Open the Java plug-in control panel - Start -> Settings -> Control Panel -> Java plug-in

2. Select the "Advanced" tab.

3. In the Java Runtime Parameters text box, enter the following:

-Xms128m -Xmx256m

These values are illustrative only - the values configured are dependent on the physical memory installed on the PC. More information about these parameters can be obtained from the Sun web site.

© 2005 Vignette Corporation. All rights reserved.34 v19.2 rev2

Page 39: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Applet Viewer for IDM Web Services Toolkit

Using the applet viewerThe applet viewer runs within a browser window or within a frame. This is dependent on how the custom web application has been designed to display the applet viewer. In any case, a toolbar is displayed above the displayed image. The current page and subpage number are shown in the status bar at the lower right-hand corner of the window. The applet viewer can be resized by clicking and dragging the sides or corners of the display window or frame.

The scale (resolution) of the initial display is the original size of the image but you can use the zoom in, zoom out and zoom to rectangle functions to change the scale of the displayed image.

When positioned over the displayed image (with zoom to rectangle disabled), the mouse pointer takes the shape of a four-pointed arrow. You can click-and-drag the image to reposition it in the frame, as an alternative to using the scroll bars.

Viewer applet toolbarThe complete viewer applet toolbar is shown below. Note that, depending on your applet viewer configuration, you might not have access to all toolbar functions.

Viewer applet toolbar

First page: Display the first page of the document. This option will be visually disabled if the first page is currently displayed.

Previous page: Display the previous page of the document. This option will be visually disabled if the first page is currently displayed.

Go to page: Display a dialog where you can enter the required page of the document. This option will be visually disabled if the current document has only one page..

Next page: Display the next page of the document. This option will be visually disabled if the last page is currently displayed.

Last page: Display the last page of the document. This option will be visually disabled if the last page is currently displayed.

Zoom to rectangle: Enlarge a selected rectangular area to the limit of the frame. To define the rectangular area, position the pointer (a hand) over one corner of the rectangle; when you hold down the left mouse button, the pointer changes to a cross-hair. Move the cross-hair to the opposite corner of the rectangle, then release the button.

Zoom in: Enlarge the currently displayed image by a factor of 1.5 both vertically and horizontally.

Zoom out: Reduce the currently displayed image by a factor of 1.5 both vertically and horizontally.

Fit to width: Scale the displayed image to occupy the width of the frame.

Fit to height: Scale the displayed image to occupy the height of the frame.

Restore original size: Rescale the displayed image to its default size.

v19.2 rev2 35IDM Web Services Toolkit for Windows Technical Reference

Page 40: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

5Chapter

AnnotationsIf your user ID is set up to do so, you can use the viewer applet to add annotations to a document. Annotations can take several forms:

• Overlay highlight—an opaque rectangle that you can draw anywhere on the image.

• Underlay highlight—a transparent rectangle that you can draw over any part of the image.

• Freeform line—a line of any shape and length that you can draw over any part of the image.

• Straight line—generally used to underline text.

• “Sticky note”—a “piece of sticky paper” on which you can type any text.

• Margin note—a textual note that you can write anywhere on the image.

• Oval—a closed oval line of any size that you can draw around any part of the image.

The annotations toolbarThe default annotations toolbar is shown below. Note that your system administrator might have given you a different selection of colors for some or all types of annotation.

Annotations toolbar

Rotate to left: Rotate the displayed image 90 degrees anti-clockwise.

Rotate 180 degrees: Rotate the displayed image 180 degrees.

Rotate to right: Rotate the displayed image 90 degrees clockwise.

Annotations: Toggle to show or hide the annotations toolbar. (See “Annotations” on page 36.)

Print: Print the current document, including any annotations.

Overlay highlight (black):

Holding down the left mouse button, use the cross-hair cursor to draw a rectangle. The rectangle will be filled with the chosen color and will be opaque. Use these like a conventional marker pen.

Overlay highlight (white):

Underlay highlight (yellow):

Holding down the left mouse button, use the cross-hair cursor to draw a rectangle. The rectangle will be filled with the chosen color and will be transparent. Use these like a conventional highlighter pen.

Underlay highlight (green):

Freeform line (green):

Holding down the left mouse button, use the cross-hair cursor to draw a line of any shape and length (including curves, loops, and polygons) in the chosen color.Freeform line

(blue):

Freeform line (white):

© 2005 Vignette Corporation. All rights reserved.36 v19.2 rev2

Page 41: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Applet Viewer for IDM Web Services Toolkit

Viewing annotationsWhenever an annotated document is displayed, all annotations are visible. However, although “sticky notes” are visible, the text in them is not visible. You can view (and, if you wish, modify) the text by double clicking the note; the text then appears in a pop-up window. Other annotations may be moved or resized by dragging them or by clicking and dragging their edges.

Saving annotationsUsually, any additions or changes you make to the annotations on a page will be saved when you click on the Save Annotations button, or when you move to another page of the document. (If you move to a different document without saving your new annotations, they will be lost.) However, it can happen that another user has made and saved changes to the same annotation at the same time. In such a case, your changes will not be saved, because they would over-write the other user’s changes that have already been saved. Instead, you will receive a message telling you that there is a conflict, and that one or more annotation changes have not been saved.

Underline (blue):

Holding down the left mouse button, use the cross-hair cursor to draw a straight line of any length in the chosen color.

Underline (red):

Oval (red):

Holding down the left mouse button, use the cross-hair cursor to draw a rectangle. An oval ring (ellipse) of the chosen color will be drawn to the edges of the rectangle.Oval

(gray):

Sticky note (pink):

Click where you want to place the sticky note. A pop-up window will then allow you to type any text onto the note. The note will appear as a rectangle of the chosen color.Sticky note

(green):

Sticky note (blue):

Margin comment (red):

Holding down the left mouse button, use the cross-hair cursor to draw a rectangle. A pop-up window will then allow you to type any text as a note. The text will appear in the chosen color.Margin comment

(yellow):

Save annotations: Save all annotations attached to the current document. Annotations will be saved automatically if you move to another page of the document (but refer to “Saving annotations” on page 37). This button is only available if you have relevant permission; check with your system administrator.)

Delete annotations: Remove all annotations from the document. (To delete a single annotation, right-click on it, then choose Annotation > Delete.)

v19.2 rev2 37IDM Web Services Toolkit for Windows Technical Reference

Page 42: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

5Chapter

Viewer applet context menuIn the viewer applet, the following facilities are available through the context menu, displayed by right-clicking on the image:

Menu option

Submenu option

Purpose

Properties Displays the properties of the current document page/subpage (the page/subpage under the pointer when you right-clicked).

Undo Reverses the last annotation change (disabled if the last action cannot be undone). Multiple undo is supported; actions will be undone in reverse sequence.

Close Subpage Closes the current document subpage (the subpage under the pointer when you right-clicked).

Page Closes the current document page (the page under the pointer when you right-clicked).

Document Closes the current dcoument.

Reload Subpage Reloads the subpage.

Page Reloads the page.

Document Reloads the document.

Order Vertical If multiple pages or subpages are open, they will be arranged in page/subpage number sequence from left to right.

Horizontal If multiple pages or subpages are open, they will be arranged in page/subpage number sequence from top to bottom.

Select Select Subpage The current subpage or page is selected (e.g., for printing); a broken line is drawn around it in the display frame. Disabled if the current subpage or page is already selected.

Unselect Subpage If the current subpage or page is selected, as shown by a broken line around it in the display frame, it will be unselected, and the broken line around it will be removed. Disabled if the current subpage or page is not selected.

Select All All displayed subpages or pages are selected (e.g., for printing); a broken line is drawn around them in the display frame. Disabled if all displayed subpages or pages are already selected.

Unselect All All currently selected subpages (or pages) are unselected; the broken line around them is removed. Disabled if no displayed subpages or pages are selected.

© 2005 Vignette Corporation. All rights reserved.38 v19.2 rev2

Page 43: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

Applet Viewer for IDM Web Services Toolkit

Multi-page documentsIf the displayed document contains multiple pages, the viewer applet can display more than one at the same time. If you already have a page open, opening another page (with Next Page, Previous Page, or Goto Page) will open the new page without closing any current page.

It is possible to zoom out on all open pages to reduce them to “thumbnail” size. You can click-and-drag individual pages. The zoom, scale, and rotate buttons on the toolbar act on the last page you clicked on.

You can navigate through multi-page (or multi-subpage) documents using the keyboard:

SubpagesIf the displayed document page includes subpages, a small subpage navigation bar appears below the vertical scroll bar in the display frame.

Options Zoom On Server If checked, all requests for zoom in or out will be processed on the server, and the resultant image sent to the browser.If unchecked, all requests for zoom in or out are processed locally.

Smooth Shape If checked, “anti-aliasing” will be applied in order to smooth transitions between colors. Anti-aliasing improves the appearance of continuous-tone (photographic) images, but is generally unsuitable for bitmap images.If unchecked, anti-aliasing is not performed.Note that anti-aliasing of large images can impose a heavy processing load.

Show Save Dialog If checked, you will be prompted to confirm saving any changed annotations when you move to another page of the document.If unchecked, changed annotations will be saved without prompting when you move to another page of the document.

Show On Load Zoom Dialog

If checked, then whenever a “big tiff” document (document whose size prevents a display in max. zoom, defined by the system administrator in ttuws.props) is requested, a message will be displayed.

Image type Monochrome Sets color depth to monochrome.

Gray Sets color depth to gray scale.

Full Color Sets color depth to full color.

Function Key

Previous Page PageUp

Next Page PageDown

Previous Subpage Ctrl+PageUp

Next Subpage Ctrl+PageDown

Menu option

Submenu option

Purpose

v19.2 rev2 39IDM Web Services Toolkit for Windows Technical Reference

Page 44: IDM Web Services Toolkit for Windows IDM Web Services Toolkit for... · IDM Web Services Toolkit for Windows Technical Reference Introduction 1 Overview The IDM Web Services Toolkit

5Chapter

Viewer applet showing document with subpages

The subpage navigation bar looks like this:

Subpage navigation bar

Go to the previous subpage.

Display a dialog allowing you to enter the number of the subpage you want to navigate to. If the number you enter is greater than the number of subpages, the last subpage will be displayed.

Go to the next subpage.

Subpagenavigation bar

Document display

© 2005 Vignette Corporation. All rights reserved.40 v19.2 rev2