Service contracts

File Watcher Utilities applications can consume Windows Communication Foundation services (typically web services) that use the File Watcher Utilities specific service contracts. The service contracts allow developers to create file streaming and file change information storing type of services. The File Watcher Utilities source code contains sample implementations of these service contracts. These service implementations can be used as starting point of service development.

Common scenarios solved by using services

How to configure a service to be called

File Watcher Utilities applications uses the endpoint name of the Windows Communication Foundation service and the daemon name of the file watcher to map the service to call. For this reason the service endpoint name must be equal to the daemon name of the file watcher that calls the service. When calling a file streaming service the streamFile (see XML configuration ) must be set to true or the ''Stream file to service'' (see File Watcher Simple) must be selected.

IFileWatcherService service contract

IFileWatcherService service contract can be used to create file change information storing type of service.

Operations

SystemChangedRespDC SystemChanged(SystemChangedReqDC request)

Data contracts

SystemChangedRespDC

Property Description
Message Gets or sets message.

SystemChangedReqDC

Property Description
ChangeType Gets or sets the change type of the file or directory.
Checksum Gets or sets file MD5 checksum.
DaemonName Gets or sets the daemon name of the file watcher.
DateTime Gets or sets the date and time of the file or directory change. Uses local time.
FileName Gets or sets the name of the changed file or directory (relative path to directory being watched).
FullPath Gets or sets the full path of the changed file or directory.
Id Gets or sets event identifier.
MachineName Gets or sets the machine name that send the message.
OldFullPath Gets or sets the old full path of the changed file or directory. Empty if file or directory is not renamed.

DefaultFault

Property Description
ErrorCode Gets or sets error code.
Id Gets or sets fault identifier.
Message Gets or sets message.
Severity Gets or sets severity.

IFileWatcherStreamingService service contract

IFileWatcherStreamingService service contract can be used to create file streaming service.

Operations

SystemChangedRespMC SystemChangedStreaming(SystemChangedReqMC request)

Message contracts

SystemChangedReqMC

Property Description
ChangeType Gets or sets the change type of the file or directory.
Checksum Gets or sets file MD5 checksum.
DaemonName Gets or sets the daemon name of the file watcher.
DateTime Gets or sets the date and time of the file or directory change. Uses local time.
FileName Gets or sets the name of the changed file or directory (relative path to directory being watched).
FileStream Gets or sets streamed file.
FileStreamLength Gets or sets file stream length.
FullPath Gets or sets the full path of the changed file or directory.
Id Gets or sets event identifier.
MachineName Gets or sets the machine name that send the message.
OldFullPath Gets or sets the old full path of the changed file or directory. Empty if file or directory is not renamed.

SystemChangedRespMC

Property Description
Message Gets or sets message.

Copyright © 2006-2013 Jussi Hiltunen