Default Normal Template - Sensor Access

snortfearServers

Dec 4, 2013 (3 years and 6 months ago)

70 views

Managing
GuardPointPro

Cardholders via HTTP

Doc.
1
0TE570



04 February 2008



Page
1
/
5



Managing
GuardPointPro

Cardholders via HTTP



Publication
10TE570







04

February 2008



Introduction

This document explains how to create new cardholders (employees, guard, visitors) or how to remove them
in
GuardPointPro

with a simple XML

command, sent from Internet Explorer or from any external
application (Télémaque, etc.).


Principle

When the XML command is sent, it follows the HTTP protocol. This means that on the
GuardPointPro

PC,
the Microsoft
IIS 5.0 or higher web server
should be
installed (usually included in Windows).
Once the
command reaches the HTTP server, it is passed to a special DLL, which DDS has developed
.

This dll is called an ISAPI dll (short cut for Internet Server API). The DLL receives the command, and then
translate
s the command into a Spread command, which is sent to
GuardPointPro

,

which must first be
launched
.

The Spread is a tool that
GuardPointPro

launches automatically at the startup.
Therefore the
ISAPI is a kind of a protocol converter between HTTP and Sprea
d.


When the DLL is called for the first time, it initiates a new connection to the Spread server. Once a session
is established with the Spread server,
it is used by subsequent calls to the DLL
.

If
GuardPointPro

is closed

during operation,

then the Sprea
d also drops
. This means that the connection is
lost.
When the DLL will be called again, the system will check first whether the session is still valid, if not a
new connection will be initialized to the server Spread.


















Installation

Here a
re the steps to set up the connection between the ISAPI DLL and the Spread:


1.

Install the new version of
GuardPointPro

(1.7.034 or more)

2.

Install the Microsoft IIS

server:

a.

Make sure that Microsoft IIS is installed: To check that IIS is installed, right clic
k on “My
Computer” on the desktop, and choose “Manage”. A window will open. Double
-
click on the
"Services and Applications" on the left side. You should see “Internet Information Services”,
otherwise you need to install IIS.

b.

If Microsoft IIS is not install
ed, go to Add/Remove programs in the Control Panel. Then
select from the Left panel, Add/Remove Windows Components. Click the check
-
box of
“Internet Information Services”. Once installation is complete, repeat Step 2.a.




Application
externe

HTTP

GPP Serve
r


IIS

Server

ISAPI DLL



GuardPoint
Pro
5


Spread

Protcole
Spread

Managing
GuardPointPro

Cardholders via HTTP

Doc.
1
0TE570



04 February 2008



Page
2
/
5

3.

Install the ISAPI

DLL:

a.

Place the tw
o following files in any folder, for example c:
\
amisapi
\

i.

Am5www.dll

ii.

Listpd.dll

b.

Create a virtual directory: Go to the Internet Information Service as described in step 2.a.
Then open the “Web Sites” folder located on the left side. Right click on the “Defau
lt Web
Site” and choose “New” and then “Virtual Directory”.




c.

In the Wizard enter an alias, for example:
am5

and select the folder where the DLL has been
placed in step 3.a. Check the first 3 checkboxes (Read, Run and Execute) and finish the setup.

d.

If th
e operating system is
Windows 2003
, allow the newly installed ISAPI extension for not
receiving an error 404. To do so, follow the steps below:

i.

Using IIS Administration Manager, click and expand the Server Name as described in
step 2.a

ii.

Select Web Services
Extensions

iii.

Select the task 'Add a new Web Service Extension’

iv.

Give your Extensions a name (i.e. AM5WWW)

v.

Browse to the directory where the am5www.dll is stored

vi.

Enable Set Extension Status allowed Checkbox and select OK.

vii.

The New Entry should automatically sho
w a Green Check to indicate it is enabled.

viii.

Stop and Restart your Web server.

4.

Start the Web Service by right
-
clicking on the Default Web Site and choose Start.

5.

Test the DLL installation: Open Internet Explorer and indicate in the address bar:
http:/localhos
t/<VIRTUAL DIRECTORY>/am5www.dll
, where in place of <VIRTUAL
DIRECTORY>, is the alias chosen to step 3.c
.
In our example, the address to enter from the
GuardPointPro

server is as follows:
http://localhost/am
5/am5www.dll
. If
GuardPointPro

is running
with the Spread, we should see the following screen:




Managing
GuardPointPro

Cardholders via HTTP

Doc.
1
0TE570



04 February 2008



Page
3
/
5

o

If seeing


2
instead of
1
,
it means that the connection has failed
;
either the Spread server is down (it
is launched automatically when
GuardPointPro

sta
rts), or the DLL is trying to connect to the Spread
before the Spread is launched
.

In this case, stop and restart the Web Service (see Step 4) and try
again after checking that the Spread works. To stop and restart the Web Service from a MS DOS
command lin
e, type:

net stop w3svc
, and
net start w3svc
.

o

If seeing


8
instead of
1
,
it means that the connection is closed because the Spread is off. In this
case, restart
GuardPointPro

for launching the Spread.

o

If seeing


11
instead of
1
,
it means that the connecti
on to the Spread has been established, but was
stopped because the Spread has restarted. In this case, stop and restart the Web Service (see Step 4)
and try again after checking that the Spread works.


Sending the XML command

Once the connection is establi
shed, the XML command can be sent to the
GuardPointPro

server address. It
consists of two parts: the DLL call on the one hand, then the command on the other hand, indicated here by
the
<XML>
parameter. You can send it from the
GuardPointPro

server PC, by

typing:


http://localhost/am5/am5WWW.dll?xmlcommand?<XML>


or from any PC that having access to the
GuardPointPro

server, by typing:

http://<
GuardPointPro

serve
r IP address>/am5/am5www.dll?xmlcommand?<XML>

The parameter

<XML>

is to be replaced by the co
mmand that we want to send, with the following format:

<a>


<cmd>BNFVisiteur</cmd>


<param>


<t>


<ID>
DDS1234
</ID>





-

ID Number of the Cardholder


<Last_Name>
Smith
</Last_Name>



-

Cardholder Last Name (
mandatory
)


<First_Name>
John
</First_Name>



-

Cardholder First Name



<BadgeCode>
12345678
</BadgeCode>



-

Cardholder Cardcode


<AccGrpID>
1
</AccGrpID>




-

Access Group ID


<StartDate>
01/04/2005 08:15:12
</StartDate>
-

Validation start (Date+Time)


<EndDate>
01/04/2005 23:59:59
</EndDate>

-

Vali
dation end (Date+Time)


<Company>
DDS
</Company>




-

Company


<Inviter>
Peter
</Inviter>




-

Visited person (if Visitor)


<Status>
0
</Status>





-

See détails below


<OperatorName>
Emma
</OperatorName>


-

Operator Name (if Visitor)


<Techno>
2
</Techn
o>





-

Card Technology


<Exceptions>






-

Exceptions


<Exception


ReaderID=

1



WPID=

1


FromDate=
””

ToDate=
””

/>


<Exception


ReaderID=

2



WPID=”
5
” FromDate=

01/01/2008 14:00:00


ToDate=

31/12/2008 23:59:00

/>


</Exceptions>


</t>


</para
m>

</a>

Where:

AccGrpID

: Id of the Access Group from
GuardPointPro

database table ACCGRP.ID

Status

:
‘0’ for creating Visitor, ‘1’ for creating Employee, ‘2’ for creating ‘Guard’ or ‘4’ for removing

ReaderID

: Id of the Reader from
GuardPointPro

database
table READER.ID

WPID

: Id of the Weekly Program from
GuardPointPro

database table WP.ID

FromDate

: Date of the beginning of the Exception (if empty, the beginning is immediately valid)

ToDate

: Date of the end of the Exception (if empty, the exception neve
r expires)


Managing
GuardPointPro

Cardholders via HTTP

Doc.
1
0TE570



04 February 2008



Page
4
/
5

Notes :



Blue commands are not changeable, but the fields order is not important (for example, <Company>
can be written before <BadgeCode>).



Some fields are optional (for example, the Operator Name, so the line beginning by
<OperatorName> can b
e omitted). However, for some fields, default values are set if empty:

-

<StartDate>, the default value is the current date with the time 00:00

-

<EndDate>, the default value is the current date with the time 23:59

-

<Techno>, the default value is 2 (bar code)

-

<Status>, the default value is 0 (creating of Visitor)



The date should be formatted in
day / month / year

with two digits for the day, two digits for the
month and 4 digits for the year as dd / mm / yyyy hh: mm: ss ".



In the ‘All Cardholders’ screen of
Gu
ardPointPro

, the name of the visited person appears in the
‘Visited person location’ field and the Operator Name appears in the ‘Visit purpose’ field.



No check is made (if the card already exists or if it is already assigned to someone else, if the last
name is empty, if the visited person exists, if there are conflicts between exceptions… )



To delete all the visitors with a single command, just to set ID to 0 and Status to 4.



To check that no errors are in the XML command, copy
the <XML> part in a tex
t file, rename the file with the
extension .xml and launch it to edit it in the form below:



The different card technologies are:

-

1 for Magnetic Card


-

5 for Wiegand Keypad

-

2 for Bar code


-

6 for Bio Smart Card

-

3 for Wiegand


-

7 for Touch

-

4 for Wiegand

2


-

8 for Radio

Examples of XML commands

:

o

Creating the Visitor «

Roberto San Diego

», with an
access anywhere and end of the validation date, send:

http://localhost/am5/am5www.dll?xmlcommand?<a><cmd>BNFVisiteur</cmd><param><t><ID>DDS123</ID><Last_Name>S
an%20Diego</Last_Name><First_Name>Roberto</First_Name><BadgeCode>00000544</BadgeCode><Techno>3</Techno><
EndDate>26/12/2008 23:30:00</EndDate><AccGrpID>1</AccGrpID><Status>0</Status></t></param></a>

o

Creating the Employee «

John Smith», with an access anywhe
re, a Company name, visit
parameters and beginning and end of the validation date, send:

http://localhost/am5/am5www.dll?xmlcommand?<a><cmd>BNFVisiteur</cmd><param><t><ID>DDS124</ID><Last_Name>S
mith</Last_Name><First_Name>John</First_Name><BadgeCode>000005
67</BadgeCode><AccGrpID>1</AccGrpID><StartD
ate>01/04/2005 08:15:12</StartDate><EndDate>31/12/2008
23:59:59</EndDate><Company>DDS</Company><Inviter>Paul</Inviter><Status>1</Status><OperatorName>Brigitte</Operat
orName><Techno>3</Techno></t></param></a>

o

Creat
ing the Guard «

Peter Carter

», with a temporary access on one reader, send:

http://localhost/am5/am5www.dll?xmlcommand?<a><cmd>BNFVisiteur</cmd><param><t><ID>DDS125</ID><Last_Name>C
arter</Last_Name><First_Name>Peter</First_Name><BadgeCode>000005B3</BadgeC
ode><Techno>3</Techno><AccGrpID
>0</AccGrpID><Status>2</Status><Exceptions><Exception ReaderID='1' WPID='1' FromDate='01/12/2007 14:00:00'
ToDate='31/12/2008 23:59:00'/></Exceptions></t></param></a>

o

Creating the Visitor «

Larry Gordon

», with an access a
nywhere except two readers, send:

http://localhost/am5/am5www.dll?xmlcommand?<a><cmd>BNFVisiteur</cmd><param><t><ID>DDS126</ID><Last_Name>G
ordon</Last_Name><First_Name>Larry</First_Name><BadgeCode>000005A3</BadgeCode><Techno>3</Techno><AccGrpI
D>1</AccGrpID
><Status>0</Status><Exceptions><Exception ReaderID='1' WPID='2' FromDate='' ToDate=''/><Exception
ReaderID='2' WPID='2' FromDate='' ToDate=''/></Exceptions></t></param></a>

o

Deleting the Visitor «

Roberto San Diego

» by his ID number, send:

http://localho
st/am5/am5www.dll?xmlcommand?<a><cmd>BNFVisiteur</cmd><param><t><ID>DDS123</ID><Status>4</Stat
us></t></param></a>

o

Deleting the all the Visitor, send:

http://localhost/am5/am5www.dll?xmlcommand?<a><cmd>BNFVisiteur</cmd><param><t><ID>0</ID><Status>4</Status>
</t
></param></a>


Managing
GuardPointPro

Cardholders via HTTP

Doc.
1
0TE570



04 February 2008



Page
5
/
5

Executing Process or Action via XML command

In cases where more fields than those described above, must be filled in the cardholder's screen or if data on
cardholders should be changed or if a lot of cardholders are to be created at the
same time, it is possible to
execute an action or a process via XML command in order to import a Hr.xls type file that contains the
changes.

To do this, simply fill the Hr.xls with the changes and create an action for importing the Hr.xls file.

Then, send
the XML command below for executing automatically the process/action chosen by its ID
number (the ID is foundable in the database).



http://localhost/am5/am5WWW.dll?xmlcommand?<perform><cmd>
ExecuteProcess
</cmd><param><tt><
pID>
1
</pID></tt></param></perfo
rm>



Where:

cmd

:
ExecuteProcess

for executing a process or
ExecuteAction

for executing an action

pID

: Id of the Process or Action, from
GuardPointPro

database table PROCESS.ID or ACTION.ID