0% found this document useful (0 votes)
237 views10 pages

ZK SOAP SDK Manual

This document provides an overview and manual for ZK Software's SOAP interface development. It defines SOAP, describing its envelope structure, encoding rules, and use of XML. It outlines the SOAP envelope, header, and body syntax. It also summarizes the functions supported by the ZK fingerprint machine's SOAP interface, which is based on the built-in WebServer, and provides guidelines for using Microsoft's SOAP toolkit to develop with the SOAP interface.

Uploaded by

Ferdinand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
237 views10 pages

ZK SOAP SDK Manual

This document provides an overview and manual for ZK Software's SOAP interface development. It defines SOAP, describing its envelope structure, encoding rules, and use of XML. It outlines the SOAP envelope, header, and body syntax. It also summarizes the functions supported by the ZK fingerprint machine's SOAP interface, which is based on the built-in WebServer, and provides guidelines for using Microsoft's SOAP toolkit to develop with the SOAP interface.

Uploaded by

Ferdinand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

ZKSoftware Inc

SOAP development Manual

Version: 2.0

2006 .12
ZK SOAP interface development manual

1 ZK Web Server SOAP definition and description ................2


1.1Summarize ...........................................................................................................................2
1 SOAP Summary.............................................................................................................2
2 with the XML relation....................................................................................................2
3 SOAP envelopes ............................................................................................................3
5. Based on the WEBSERVER SOAP realization ............................................................4
1.2Agreement............................................................................................................................4
1.3 prepare developments..........................................................................................................5

2. Function ...........................................................................................................................7
2.1 Download Attendance log ...................................................................................................7
2.2 Download User information................................................................................................7
2.3 Download User Fingerprint Template .................................................................................8
2.4 Upload User Information ....................................................................................................8
2.5 Upload User Fingerprint Template......................................................................................8
2.6 Delete User..........................................................................................................................8
2.7 Get MachineTime................................................................................................................9
2.8 Setting Time to Machine .....................................................................................................9
2.9 Setting Parameter to Machine .............................................................................................9
2.10 Communication Password (security code).....................................................................9
2.11 Upgrade firmware .............................................................................................................9
2.12 Clear data ........................................................................................................................10
2.13 Refresh device’s database ...............................................................................................10
2.14 Reboot device..................................................................................................................10

3 Use MS SOAP-TOOLKIT 3.0 ................................................................10

1
! "#! $ % &
ZK SOAP interface development manual

Release history
Date Revision Change

2006.12 1.0 First release

1 ZK Web Server SOAP definition and description

1.1Summarize

1 SOAP Summary

SOAP is a lightweight protocol intended for exchanging structured information in a decentralized, distributed
environment. SOAP uses XML technologies to define an extensible messaging framework, which provides a
message construct that can be exchanged over a variety of underlying protocols. The framework has been
designed to be independent of any particular programming model and other implementation specific semantics.
Second, SOAP can be used over any from transport message and RPC all kind of system

SOAP include three parts

• SOAP envelope structure has defined an whole framework that may express any content which the message
contain, who process these contents, and these contents may be optional or necessary.
• SOAP encoding rule define a series of mechanisms that exchange data type of the application.
• SOAP RPC defines an agreement that express the remote procedure call and the respond.

Although these three parts all together are described as a SOAP part, but their function are in intersection.
Special, the encapsulation and coding rule are defined in the different namespace, this module definition method
increased the simplicity to the SOAP envelope, beside of the SOAP encoding rule and the SOAPRPC agreement,
this standard also defined two binding agreements, which describes how to transmit the SOAP message which is
contained in the HTTP message whether there are HTTP extension the framework or not.

2 with the XML relation

all SOAP message base on XML (more information please refer to the documents which related XML), for a
SOAP application message, the SOAP definition attribute and the attribute must include the correct namespace .
The SOAP application must be able to process SOAP namespace of the message which it received, and it may
process SOAP message that is without the SOAP namespace, they are same as result, just like it own the correct
namespace. SOAP defined two namespace (more related XML namespace information please t refer to related
XML documents)

• the soap envelope namespace sign is " Http://schemas.xmlsoap.org/soap/envelope/


• the soap encoding rule namespace sign is " Http://schemas.xmlsoap.org/soap/encoding/

2
! "#! $ % &
ZK SOAP interface development manual

SOAP message cannot contain the documents type statement, also cannot include the message handling
instruction. SOAP uses The " ID" Type " Id" attribute to assign only sign to attribute, simultaneously this
attribute is partial and do not need to verify. SOAP uses The " Uri-reference" Type " Href" attribute to assign
this value citation, simultaneously this attribute is partial and do not need to verify. So it comply with the
XML standard, the XMLSchema standard and the XML connection language standard style. Besides of SOAP
the mustUnderstand attribute and the SOAPactor attribute, generally allow the attribute and their value appears
in the XML documents example or Schema (two effects is same). In other words, the default value or the fix
value is stated by DTD or Schema, and set its value in the XML documents example is in semantic affinity.

3 SOAP envelopes

SOAP message is a XML document; include an essential SOAP envelope, optional header and an mandatory
SOAP body. In residual part of this standard, when mention SOAP message that refer to this XML documents.
In this defined attribute and attribute namespace sign is: “Http://schemas.xmlsoap.org/soap/envelope/"

A SOAP message including below part:

1. In the XML documents to express this message, the envelope is the top layer attribute.

2. All quarters which use SOAP exchange information is dispersible and without prearrange, SOAP header has
provided with the mechanism that add certain essential element which is about this SOAP message (feature) to
the SOAP message. SOAP defines a few attribute that indicate this essential element (feature) whether could be
optional or who processes it.

3. SOAP body is a generic container in that it can contain the message finally the receiver wants. SAOP defines
an element named Fault for representing errors within the Body element when things go wrong. This is
essential because without a standard error representation.

4.SOAP Syntax rule

Envelopes

1. Attribute name is "Envelope"


2. must appear in the SOAP message SOAP.


3. may include the namespace statement and append attribute, if include append attribute, must limit the
namespace of the these attribute, like as these, “"Envelope" may include append sub-attribute, also these
namespace must be limited and follow the SOAP body .

SOAP Header

1. Attribute name is "Header"


2. May appear in the SOAP message, if it appear, must be the first sub- attribute of the SOAP envelop.
3. SOAP header may include many items, each item is direct sub- attribute of the SAOP attribute, and all direct
sub-attribute of the SOAP header must be limit namespace.

3
! "#! $ % &
ZK SOAP interface development manual

SOAP body

1. Attribute name is"Body"


2. Must appear in the SOAP message and be direct sub-attribute of the SOAP envelop attribute, which must
follow the SOAP attribute behind ,SOAP body may include many item, each item is direct sub- attribute of
the SAOP body attribute, all direct sub-attribute of the SOAP body may be limit namespace , SOAP defines
an element named Fault for representing errors.

5. Based on the WEBSERVER SOAP realization

ZK fingerprint machine’s SOAP interface base on the built-in WebServer foundation, realized a lightweight
simple, extensible, and rich XML messaging framework for defining higher-level application protocols.
Note
1. Character set
This SOAP interface supports the character set that is the ISO8859-X series character coding, also the single
byte character set, simultaneously also supports partial double byte character coding ,like Chinese and so on
(Chinese and so on double byte character set possibly not to support in MS SOAP SDK, when use Chinese and
so on double byte character set, please refer to relative MS SOAP SDK technology documents which about
Chinese solution)
2. XML Formats
this SOAP interface support XML the standard WELL FORMAT formats, namely do not support high-level
XML the characteristic, like DTD data verification mode, regarding the SOAP " Header " in SOAP any content

will be neglected. this SOAP XML code format produces by the attribute value form,
$UJ9DOXH ā[[[[ā!$UJ!
$UJ!9DOXH![[[[9DOXH!$UJ!
cannot write is: xxxx the wrong code

1.2Agreement

All parameter is transferred by <Arg/> form.


All return value is indicated by <Row> form.
All SOAP provide with POST method.
the agreement about return value:
Regarding all SET method, which return form <Row RetCode=”xx” RetValue=”xxxx”></Row>
RetCode is return status code, RetValue is the description character strings to returns condition
wrong code

If the format provided by SOAP-XML is different with WELL FORMAT or the name of visiting way does not
exist, the system will return 500 universality server faults.
✂ E.g The 404 error occur when visiting name make
mistake took HTTP head to return 404
Serve Name iWsService This Serve Name indicate that Web Server supply SAOP server

HTTP Head Pursuant the SOAP-HTTP head rule, the description is follow
POST /iWsService HTTP/1.0 ‘Need SOAP sever

4
! "#! $ % &
ZK SOAP interface development manual

Content-Type: text/xml ‘Need to indicate that the XML is SOAP resolution format”.
Content-Length: nnnnn “Need to point out the size of SAOP request”. SOAPAction:”uri:someuri” ‘ Extension
HTTP protocol” show SOAP function field.

Maybe following URI is empty


E.g Ability to accept format is
SOAPAction:
SOAPAction:””
SOAPAction:”uri:someuri”
URI may be any legal domain name
After the Server responded the SAOP request, return
HTTP/1.0 200 OK ‘200 indicate successfully’
Server: ZKWEBSERVER
Content-Type: text/xml
Return XML-SOAP data

1.3 prepare developments

There is a built-in WevServer in the equipment with the SOAP interface. Therefore only needs to develop the
SOAP client end communication.
1. May login the Microsoft official website to download the newest SDK, install the SDK, how to use the
Microsoft SDK, please refer to Microsoft help.
2. download to the data structure and read the function descriptions, such as, reads the T&A record
following form, may very clear see, the XML header, the XML structure body, and conclusion part.
<?xml version="1.0" standalone="no"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
i. <GetAttLogResponse>
ii. …….
iii. …….
</GetAttLogResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
3. Please understood the sending and receiving of the SOAP request, its essential is the TCP/IP connection
request, and receive data.
4. Please understood XML DOM object use, the Microsoft SOAP SDK provided the object function to
process, contain the XML resolution, analyze and read in the node and so on.
5. the development flow chart as follow, please refer:

5
! "#! $ % &
ZK SOAP interface development manual

SoapConnector, XMLDOMNodeList, XMLDOMElement


SoapReader etc ini

Begin connect,ini Property, Action,URL,send XML to server

Conn and send succ Do Other

Read soap stream

Do Other
Read data

Read DOM

Data handle

Store the data

Complete one connect


and data handle

6. Term explanation:
Element, refers to XML some row, node. May regard the database operation the record volume as the some
corresponding row, please refer to understood.
Value: Up to corresponding attribute value. Like as Microsoft SOAP SDK SoapSerializer has the function
WriteString to be allowed to give some attribute to read in a value, please refer understood.

6
! "#! $ % &
ZK SOAP interface development manual

7. Development flow
no matter is the transmission or receive, all its essential is TCP\IP (or the HTTP request) transmits. The
middle transmission data all is the XML character data. The service end and the client process XML flow t, the
client end may depend on the SOAP SDK to produce the XML transmission request, to receive XML, analyzes
the XML node, simply completes communication, for the application, only needs to understand the SOAP the
simple application method.

2. Function

2.1 Download Attendance log

Order GetAttLog ✄


Element PIN ✄


Value Transfer “ALL” in, return all Attendance Log. Otherwise, return the user’s attendance logs which



user NO. has been transferred .


Meanings about node returning value ✄


PIN Personal identity number





Time second Attendance Time. ✄




verified Matching Way. ✄




status State, E.g checkin\out ✄




workcode Work code ✄




reserved1 Key word invalid ✄




reserved2 Key word invalid ✄




Note:All Download function,if hava data,it result data,else,it result null note in xml.

2.2 Download User information

Order GetUserInfo ✄


Element PIN ✄


Value Transfer “ALL” in, return all user information. Otherwise, return the user’s user information which



user NO. has been transferred .


Meanings about node return value ✄


PIN Personal identity number





Name User name ✄




Password Password ✄


Group User’s group privilege ✄




Privilege Privilege ✄


Card Card Number ✄




PIN2 Personal identity Number (only above 5 digit is voild).





TZ1 User Time Zone 1




7
! "#! $ % &
ZK SOAP interface development manual

TZ2 User Time Zone 2





TZ3 User Time Zone 3





2.3 Download User Fingerprint Template

Order GetUserTemplate ✄


Element PIN ✄

Value Transfer “ALL” in, return all user template,Transfer user No. in return the user’s fingerprint template



which user NO. has been transferred.


Meanings about node return value ✄


PIN Personal identity number





FingerID Fingerprint No. ✄




Size Size of fingerprint template, Note: take binary system to note.





Valid The fingerprint template whether take effect, 1 is valid, 0 is not invalid.



Template Fingerprint template ✄




2.4 Upload User Information

Order SetUserInfo ✄


Element It has same returning node and sequence as GetUserInfo. ✄




Value Transfer user No. name etc in, the Node is same configure and sequence as Get User Info return node



Meanings about node returning value ✄




Note:All SOAP request successfully and execute successfully or fail.it will return a note,include error
code,content,the content will tell you what about it.
When you upload user successfully,please use command of RefreshDB to resfresh the device’s
database.please refer the describe the command RefreshDB.

2.5 Upload User Fingerprint Template

Order SetUserTemplate ✄

Element It has same returning node and sequence as GetUser Template.


Value Transfer user No. name etc in, the Node is same configure and sequence as Get User Template returning


Note:
When you upload user successfully,please use command of RefreshDB to resfresh the device’s
database.please refer the describe the command RefreshDB.

2.6 Delete User

Order DeleteUser ✄


Element PIN ✄



Value Transfer User NO. ✄



Note:
8
! "#! $ % &
ZK SOAP interface development manual

When you upload user successfully,please use command of RefreshDB to resfresh the device’s
database.please refer the describe the command RefreshDB.

2.7 Get MachineTime

Order GetDate ✄


Element Nothing ✄

If the value is empty, the performance is successful, otherwise it’s failed.


Value: Nothing
Meanings about node returning Value ✄


Date: Return Date.


Time: Return Time.

2.8 Setting Time to Machine

Order SetDate ✄


Element Date, Time ✄




Value Transfer in Date Transfer in Time.






2.9 Setting Parameter to Machine

Order SetOption ✄

Element Name, Value ✄



Value Datep :configure name Value: Transfer parameter.





Note:
The parameter name are open by zksoftware.if you need,please contract with us,we will confirm and
open for you.

2.10 Communication Password (security code)

use the SOAP service to obtain data from the equipment, should first establish the connection password, each
time requestment all needs to verify password. .
Method key ✄


Element Value ✄


Value Equipment communication password.





Note this method work in other way to request, this method must add in the SOAP request every time, the data



do not be returned until verify security code successfully, otherwise fail to return data.

2.11 Upgrade firmware

Method: Update
9
! "#! $ % &

You might also like