Navigation:  »No topics above this level«

FDM to FP2 Transfer Service

Previous pageReturn to chapter overviewNext page

Description

The Service processes xml files that originate from the FDM system. The Service inspects the FDM xml files to perform the following

 

1.Search for the xml tag Dept for each department name value check to see if there is a matching name in the deptxref.conf file. If there is a match then process the file to the FTP server and upload the file.
2.If the xml file encounters an error due to XML formatting then the file will not be copied to the FTP server it will be placed into the xml_errors folder
3.If the xml file contains no department matches it is then placed into the transfer_errors folder
4.Service uses registry entries to setup the directory where the configuration files and log files reside
5.Service uses a Wait Time parameter to control how often the files are to be processed
6.Service will only process a file when it is at least 5 minutes old. This is to ensure that the file is not being written to when it is to be processed
7.FTP site must have userid / password setup. The folders to be used must have a parent folder with a sub folder present for each department in the deptxref.conf file

 

Registry Entries

The key HKEY_LOCAL_MACHINE\SOFTWARE\FP2\FPWSFDM needs to be created with the keyword HOME created to contain the folder location for where the configuration and log files will reside.

 

 

Configuration Files

There are two configuration files used by the service.

1.fpwsfdm.conf  - contains parameters used to perform the running of the service
2.deptxref.conf contains cross reference of the department name value in the xml file to the ftp folder used to store the xml files

 

FTP Site

The FTP site that is to receive the xml files requires that the following be setup

1.create xml root folder. This is the folder used in the FTP_SITE configuration entry
2.create a sub folder under the xml root folder for each entry in the deptxref.conf file
3.create user id / password with permission to write to the xml root folder and the sub folders

 

Sample screenshot from Filezilla

 

Log File Entries

Below are examples of the log file entries made for different processing scenarios

Start and End of Files Processing

These are the two messages that appear at the beginning and ending of the file processing. Messages related to the files being processed will be between these two messages

[11/22/2016 1:07:37 PM] [INFORMATION] [VER 1] Starting File Processing.

 

[11/22/2016 1:07:37 PM] [INFORMATION] [VER 1] Ending File Processing.

 

Successful Processing of Department Match

The example below shows the processing of a file that has two matches for stations. The text in green highlight is a comment on the entry

 

start of the file processing indicating the file being processed

[11/22/2016 1:06:34 PM] [INFORMATION] [VER 1] Starting to process file: C:\parkland_county_xml\5620686_Parkland District 2 - Parkland Village.XML

Dept Match found 

[11/22/2016 1:06:34 PM] [INFORMATION] [VER 1] Dept Found For: Parkland District 2 - Parkland Village

Dept Match found 

[11/22/2016 1:06:34 PM] [INFORMATION] [VER 1] Dept Found For: Spruce Grove Fire Services

Status of file upload for first found department

[11/22/2016 1:06:35 PM] [INFORMATION] [VER 1] Upload File Complete, status 226-File successfully transferred

226 0.099 seconds (measured here), 87.67 Kbytes per second

Information: File = ftp://fp2.ca/testdispatch/PD2/5620686_Parkland District 2 - Parkland Village.XML for Station Parkland District 2 - Parkland Village

 

 

Status of file upload for second found department

[11/22/2016 1:06:35 PM] [INFORMATION] [VER 1] Upload File Complete, status 226-File successfully transferred

226 0.102 seconds (measured here), 84.79 Kbytes per second

Information: File = ftp://fp2.ca/testdispatch/SG/5620686_Parkland District 2 - Parkland Village.XML

 

Unsuccessful Department Match

When a department that is present does not match any of the deptxref.conf entries then the following entries will be present he text in green highlight is a comment on the entry. If the file has no department matches then it is written to the transfer_errors folder. The example below shows the processing of a file with no department matches.

start of the file processing indicating the file being processed

[11/22/2016 1:10:37 PM] [INFORMATION] [VER 1] Starting to process file: C:\parkland_county_xml\5608414_nostations.XML

Dept Match not found 

[11/22/2016 1:10:37 PM] [Warning] [VER 1] Dept Not Found For: Redwater Fire Department

Warning:  did not allow a proper lookup to find a valid Station Name. The file will be placed into the folder C:\FP2\Webservice\FPWSFDM\transfer_errors

Dept Match not found 

[11/22/2016 1:10:37 PM] [Warning] [VER 1] Dept Not Found For: Sturgeon County Fire

Warning:  did not allow a proper lookup to find a valid Station Name. The file will be placed into the folder C:\FP2\Webservice\FPWSFDM\transfer_errors

Dept Match not found 

[11/22/2016 1:10:37 PM] [Warning] [VER 1] Dept Not Found For: Gibbons Fire Department (6)

Warning:  did not allow a proper lookup to find a valid Station Name. The file will be placed into the folder C:\FP2\Webservice\FPWSFDM\transfer_errors

Writing file to transfer_errors 

[11/22/2016 1:10:37 PM] [Warning] [VER 1] No Stations were not found file will be copied to transfers_errors folder

File with Bad XML

If the file being processed encounters an error when parsing the xml the file will be placed in the xml_errors folder. The example below shows the log file entries

[11/22/2016 1:20:50 PM] [ERROR] [VER 1] Service has encounter a problem with XML formatting. File being processedC:\parkland_county_xml\5139603_335_BAD.XMLFile is now present in the folder: C:\parkland_county_xml\xml_errors see Error details

Error: Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 1, position 2.