Web Services - Time
1 Module Overview
General information about the NetBaron-Web Services interface is provided in a separate document, available from NetBaron support upon request. This document describes only the Time Web Services module, which enables the use of Time-Application from external services.
The module allows working hours to be recorded in NetBaron.
Error handling must be integrated into the interfaces in case of connection interruptions.
1.1 Usage Examples
Retrieve the "Stamp-In" and "Stamp-Out" statuses for worktime tracking
Retrieve the organization's personnel list
Record working hours for an employee
1.2 Other
The methods available in the module are defined in the WSDL description. The data exchanged via the interface is validated using an XSD file referenced by the WSDL description. The XSD is available at:
https://server/ws/worktime?xsd={version}
Currently, version 1.0 is in use. The XSD file contains detailed, element-specific descriptions.
2 Technical information
2.1 Service information
Address: | https://server/ws/worktime?wsdl=1.0 |
Authentication: | Organization and the organization-specific Web Services password |
Character set: | UTF-8 |
Available methods: | Defined in the WSDL description |
Type of request: | Method call |
Type of response: | Object |
2.2 Method descriptions
2.2.1 Methods in use
Method | Definition |
GetCostCenterDetails | Retrieve cost center information |
GetWorkNumberDetails | Retrieve work number information |
GetAllStates | Retrieve the organization's work time tracking stamp-in and stamp-out statuses |
GetPersons | Retrieve the personnel list |
GetStamp | Retrieve an employee's most recent time stamp |
GetStates | Retrieve the next available statuses for stamping for an employee |
GetWorkDescriptions | Retrieve predefined work descriptions |
PairPersonToNFC | Link an employee to NFC tag information |
Stamp | Record a new time stamp for an employee |
2.2.2 GetCostCenterDetails
Retrieves cost center information. The method can be called without parameters, in which case all cost centers are retrieved depending on which method is called. The results can be filtered using the following search criteria.
Element | Type | Definition |
Id | NumberRangeParamType | Cost center ID |
Number | NumberRangeParamType | Cost center number |
Description | StringParamType | Description of the cost center |
Active | Boolean | Cost center active or not |
2.2.2.1 Method call response
The response includes all cost centers that match the search criteria. Each individual cost center is represented as a single CostCenter-object in the file. The structure of this object is defined in the XSD file used by the WSDL.
Element | Type | Definition |
CostCenterDetailsResponse | object | Includes 0 .. n pcs of CostCenter-objects |
2.2.2.2 Contents of the CostCenter-object
Element | Type | Definition |
Id | int | Cost center ID |
Number | int/token | Cost center number |
Description | token | Cost center description |
Active | boolean | Indicates whether the cost center is active (deleted or not) |
2.2.3 GetWorkNumberDetails-method
Retrieves work number details. The method can be called without parameters, in which case all work numbers are retrieved. The results can be filtered using the following search criteria.
Element | Type | Definition |
Id | NumberRangeParamType | Work number ID |
Number | StringParamType | Work number |
Description | StringParamType | Work number description |
Active | Boolean | Indicates whether the work number is active (deleted or not) |
2.2.3.1 Method call response
The response includes all work numbers that match the search criteria. Each individual work number is represented as a single WorkNumber object in the file. The structure of this object is defined in the XSD file used by the WSDL.
Element | Type | Definition |
WorkNumberDetailsResponse | object | Includes 0 .. n pcs of WorkNumber-objects |
2.2.3.2 Contents of the WorkNumber-object
Element | Type | Definition |
Id | int | Work number ID |
Number | token | Work number |
Description | token | Work number description |
StartDate | date | The start date of the work number's validity |
EndDate | date | The end date of the work number's validity |
Active | boolean | Indicates whether the work number is active (deleted or not) |
2.2.4 GetAllStates-method
Retrieves the Stamp-In and Stamp-Out statuses defined in the organization's time settings. The method has no parameters.
2.2.4.1 Method call response
The response contains the Stamp-In and Stamp-Out statuses defined in the organization's time settings.
Element | Type | Definition |
AllStates | object | Statuses available for work time stamping, categorized into Stamp-In and Stamp-Out statuses. |
2.2.4.2 Contents of the AllStates-object
Element | Type | Definition |
InStates | StateType | List of Stamp-In statuses |
OutStates | StateType | List of Stamp-Out statuses |
2.2.5 GetPersons-method
Retrieves the personnel list. The method can be called without parameters, in which case all persons are retrieved. The results can be filtered using the following search criteria.
Element | Type | Definition |
isAdmin | boolean | If the value is true, users with Administrator-level access are returned. False returns only users with User-level access. |
2.2.5.1 Method call response
The response contains a list of the organization's personnel.
Element | Type | Definition |
Persons | PersonsType | List of persons |
2.2.6 GetStamp-metodi
Retrieves the current stamp-in/stamp-out status of a person.
Element | Type | Definition |
PersonIdentifier | PersonIdentifierType | Person’s identification details |
2.2.6.1 Method call response
The response to the method call includes the person's details, Stamp-In/Stamp-Out status, and information about working time entries.
Element | Type | Definition |
CurrentState | string | If the person has an active Stamp-In, the status is In. If the person has stamped out, the status is Out. |
IsAdmin | boolean | Indicates whether the person is an administrator. |
States | StateType | List of currently available, next stampable states for the person |
Stamp | StampType | Stamping details |
PersonInfo | PersonsType | Person’s details |
WorkTimeInfo | WorkTimeInfoType | Person's working time details |
2.2.7 GetStates-method
Retrieves the list of states that the person is allowed to stamp into next.
Element | Type | Definition |
PersonIdentifier | PersonIdentifierType | Person’s identification details |
2.2.7.1 Method call response
The method returns a list of states that the person is allowed to stamp into next.
Element | Type | Definition |
States/State | StateType | List of states that the person is allowed to stamp into next
XML
|
CurrentState | string | If the person has an active stamp, the state is In. If the person has stamped out, the state is Out. |
IsAdmin | boolean | Indicates whether the person is an Administrator or an User. |
Stamp | StampType | Stamp details |
PersonInfo | PersonsType | Person’s details |
2.2.8 GetWorkDescriptions-method
Retrieves the predefined work descriptions.
Element | Type | Definition |
Type | string | ‘TimeStamp’ → returns the predefined descriptions for stamping actions. ‘TimeWork’ → returns the predefined descriptions used for billing working time. |
2.2.8.1 Method call response
The method returns a list of work descriptions entered in the Time-application settings.
Element | Type | Definition |
WorkDescriptions | WorkDescriptionsType | List of work descriptions |
2.2.9 PairPersonToNFC-method
Assigns an NFC identifier to a person.
Element | Type | Definition |
PersonId | int | Person’s ID |
PersonNFC | string | NFC identifier to be assigned to the person |
2.2.10 Stamp-method
Registers a new stamp for a person.
Element | Type | Definition |
Stamp | StampType | Details of the new stamp |
2.2.10.1 Method call response
The method call returns the most recent working time details of the person.
Element | Type | Definition |
WorkTimeInfo | WorkTimeInfoType | Person’s work time details |
2.3 Data Types
The types used in the tables above are described below.
2.3.1 NumberRangeParamType
The NumberRangeParamType is an alternative-type parameter. This means that only one of the elements presented in the following table can be used at a time.
Element | Type | Definition |
Single | int | Single number |
Range | object | Number range |
In | array(int) | Set of numbers |
The Range-object of the NumberRangeParamType-type is shown below.
Element | Type | Definition |
Start | int | The first number of the number range |
End | int | The last number of the number range |
2.3.2 StringParamType
Value | Type | Definition |
Exact | string | Retrieves values that match the search criteria |
Like | StringLikeParamType | Retrieves values that contain the search term |
In | array(string) | Retrieves values that match any of the given search terms |
2.3.3 StateType
Element | Type | Definition |
Id | int | Status ID |
Name | string | Status name |
EstimatedReturnTimeRequired | boolean | Does stamping the status require an estimated return time? |
2.3.4 PersonsType
Element | Type | Definition |
Id | int | Person’s ID |
Name | string | Name of status |
IsAdmin | boolean | Is the person an administrator or a user? |
NFC | string | NFC tag info assigned to the person |
CostCenter | string | Default cost center assigned to the person |
StampMethod | string | ‘Autom’: the current time is always used for the stamping, ‘Forced’: the person must provide a time ‘Manual’: the person can enter a time other than the current time |
2.3.5 PersonIdentifierType
The person is identified either by login credentials or an NFC tag, in the API-request. The message must contain either an NFC tag or a Username/Password pair.
Element | Type | Definition |
Username | string | The person's username |
Password | string | The person's password |
NFC | string | The person's NFC tag |
2.3.6 WorkTimeInfoType
Element | Type | Definition |
Date | date | Date of the entry |
DateSum | string | Total work time accumulated for the day |
WeekSum | string | Total work time accumulated for the week |
TotalSum | string | Total accumulated working time |
DateFlexitimeSaldo | string | Flexitime balance for the day |
WeekFlexitimeSaldo | string | Flexitime balance for the week |
TotalFlexitimeSaldo | string | Total flexitime balance |
2.3.7 StampType
Element | Type | Definition |
PersonIdentifier | PersonIdentifierType | Person’s identification information |
CurrentState | string | 'Out' or 'In' depending on the status. |
StateId | int | Identification information for the stamping status |
Attachments | AttachmentsType | Attachments when sending a new stamp to the server |
Location | LocationType | Location data |
Time | dateTime | Time of the stamp |
EstimatedReturnTime | date | Estimated return date |
WorkDescription | string | Work description |
ProjectNumber | string | Work number |
ProjectDescription | string | Work number description |
InvoiceHour | string | Hours to be invoiced: 'Y' or 'N' |
CostCenter | string | Cost center |
CostCenterDescription | string | Cost center description |
StampMethod | string | 'Manual' → time is entered manually 'Autom' → current time is used 'Forced' → time must be entered manually |
WorkTimeInfo | WorkTimeInfoType | Work time entry details |
2.3.8 WorkDescriptionsType
Element | Type | Definition |
Id | int | Work description ID |
Title | string | Description title |
Description | string | Work description |
Default | boolean | Description is default |
2.3.9 AttachmentsType
Element | Type | Definition |
Attachment/Data | base64binary | File content |
Attachment/Filename | string | File name |
Attachment/Mimetype | string | File MIME type |
2.3.10 LocationType
Element | Type | Definition |
Longitude | double | Longitude |
Latitude | double | Latitude |
Timestamp | datetime | Timestamp |
3 Code samples
The code samples presented in the documents are examples of how the interface can be used. The available code package can be used as it is or further developed to suit individual needs. Implementation of the codes requires PHP knowledge from the www-service provider. NetBaron Solutions OY is not responsible for any direct or indirect damage and costs related to the sample codes when a third party does the implementation and further development.
Please note: The software code created and implemented must not cause server overload situations. We reserve the right to bill the creator of the software code or the end customer for system failure in the server environment. If necessary, please get the software code checked by sending it to our support tuki@netbaron.fi and adding the mention: "WS-Service interface software code to product development for review and possible feedback".
3.1 PHP
3.1.1 Initializing the client
<?php
/**
* Client
*/
try {
$client = new SoapClient(
"https://<server_url>/ws/worktime?wsdl=<wsdl_version>",
array(
'uri' => "urn:NBWS",
'style' => SOAP_DOCUMENT,
'use' => SOAP_LITERAL,
'soap_version' => SOAP_1_2,
'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5,
'cache_wsdl' => WSDL_CACHE_NONE
));
} catch (Exception $ex) {
var_dump($ex);
}
/**
* UsernameToken
*/
$ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
$UsernameToken = new stdClass();
$UsernameToken->Username = new SoapVar(utf8_encode('username'), XSD_STRING, null, null, null, $ns);
$UsernameToken->Password = new SoapVar(utf8_encode('password'), XSD_STRING, null, null, null, $ns);
$Security = new stdClass();
$Security->UsernameToken = new SoapVar($UsernameToken, SOAP_ENC_OBJECT, null, null, null, $ns);
$Header = new SoapVar($Security, SOAP_ENC_OBJECT, null, null, null, $ns);
$Headers = array(
new SoapHeader($ns, 'Security', $Header)
);
$client->__setSoapHeaders($Headers);
?>
3.1.2 GetCostCenterDetails
<?php
try {
// Gets the cost centers which have an id in the range of from 1 to 10
$parameters = array (
'Id' => array (
'Range' => array (
'Start' => 1
'End' => 20)));
$response = $client->getCostCenterDetails($parameters);
//handle response
} catch (SoapFault $fault) {
// handle exception
}
?>
3.1.3 GetWorkNumberDetails
<?php
try {
// Gets the work numbers with specified ids
$parameters = array (
'Id' => array (
'In' => array (4101, 2891, 2961)
)
);
$response = $client->getWorkNumberDetails($parameters);
//handle response
} catch (SoapFault $fault) {
// handle exception
}
?>
3.1.4 GetAllStates
<?php
$resp = $client->GetAllStates();
?>
3.1.5 GetPersons
<?php
$client->GetPersons();
$client->GetPersons(array('isAdmin' => false));
$client->GetPersons(array('isAdmin' => true));
?>
3.1.6 GetStamp
<?php
$resp = $client->GetStamp(array(
'PersonIdentifier' => array(
'Username' => 'ws-time',
'Password' => 'ws-time'
),
)
);
?>
3.1.7 GetStates
<?php
$resp = $client->GetStates(array(
'PersonIdentifier' => array(
'Username' => 'ws-time',
'Password' => 'ws-time'
)
));
?>
3.1.8 GetWorkDescriptions
<?php
$resp = $client->GetWorkDescriptions(array('Type' => 'TimeStamp'));
?>
3.1.9 PairPersonToNFC
<?php
$resp = $client->PairPersonToNFC(array(
'PersonId' => $personid,
'PersonNFC' => $personnfc
));
?>
3.1.10 Stamp
<?php
// basic stamp information
$resp = $client->Stamp(
array(
'PersonIdentifier' => array(
'Username' => 'ws-time',
'Password' => 'wstime'
),
'StateId' => 1,
)
);
// complete stamp information
$resp = $client->Stamp(
array(
'PersonIdentifier' => array(
'NFC' => '04:2E:D2:E2:BB:2B:80'
),
'StateId' => 1,
'ProjectNumber' => '1',
'CostCenter' => '1',
'Attachments' => array(
array(
'Data' => base64_encode('bar'),
'Filename' => 'bar.txt',
'Mimetype' => 'text/plain'
),
array(
'Data' => base64_encode('foo'),
'Filename' => 'foo.txt',
'Mimetype' => 'text/plain'
),
array(
'Data' => base64_encode(file_get_contents('../img.jpg')),
'Filename' => 'img.jpg',
'Mimetype' => 'image/jpeg'
)
),
'WorkDescription' => 'Description',
'Time' => '2015-07-23T16:00:00',
'EstimatedReturnTime' => '2015-07-24T16:00:00',
'Location' => array(
'Latitude' => 62.533521,
'Longitude' => 27.403967,
'Timestamp' => '2015-07-24T16:00:00'
)
)
);
?>
3.2 XML
3.2.1 GetCostCenterDetails
3.2.1.1 Request
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:worktime:v1.0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns1:CostCenterParameters>
<ns1:Id>
<ns1:Range>
<ns1:Start>1</ns1:Start>
<ns1:End>10</ns1:End>
</ns1:Range>
</ns1:Id>
</ns1:CostCenterParameters>
</env:Body>
</env:Envelope>
3.2.1.2 Response
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0">
<env:Body>
<ns1:CostCenterDetailsResponse>
<ns1:CostCenter>
<ns1:Id>1</ns1:Id>
<ns1:Number>100</ns1:Number>
<ns1:Description>100</ns1:Description>
<ns1:Active>true</ns1:Active>
</ns1:CostCenter>
<ns1:CostCenter>
<ns1:Id>11</ns1:Id>
<ns1:Number>101</ns1:Number>
<ns1:Description>101</ns1:Description>
<ns1:Active>true</ns1:Active>
</ns1:CostCenter>
</ns1:CostCenterDetailsResponse>
</env:Body>
</env:Envelope>
3.2.2 GetWorkNumberDetails
3.2.2.1 Request
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:worktime:v1.0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns1:WorkNumberParameters>
<ns1:Id>
<ns1:In>4101</ns1:In>
<ns1:In>2891</ns1:In>
<ns1:In>2961</ns1:In>
</ns1:Id>
</ns1:WorkNumberParameters>
</env:Body>
</env:Envelope>
3.2.2.2 Response
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Body>
<ns1:GetWorkNumberDetailsResponse>
<ns1:WorkNumber>
<ns1:Id>4101</ns1:Id>
<ns1:Number>0</ns1:Number>
<ns1:Description>Test project</ns1:Description>
<ns1:StartDate xsi:nil="true"/>
<ns1:EndDate xsi:nil="true"/>
<ns1:Active>true</ns1:Active>
</ns1:WorkNumber>
<ns1:WorkNumber>
<ns1:Id>2891</ns1:Id>
<ns1:Number>0</ns1:Number>
<ns1:Description>title 1</ns1:Description>
<ns1:StartDate>2010-06-20</ns1:StartDate>
<ns1:EndDate xsi:nil="true"/>
<ns1:Active>true</ns1:Active>
</ns1:WorkNumber>
<ns1:WorkNumber>
<ns1:Id>2961</ns1:Id>
<ns1:Number>0</ns1:Number>
<ns1:Description>adfadf</ns1:Description>
<ns1:StartDate>2010-10-15</ns1:StartDate>
<ns1:EndDate>2010-10-25</ns1:EndDate>
<ns1:Active>true</ns1:Active>
</ns1:WorkNumber>
</ns1:GetWorkNumberDetailsResponse>
</env:Body>
</env:Envelope>
3.2.3 GetAllStates
3.2.3.1 Request
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns2="wsse">
<env:Header>
<ns2:Security>
<ns1:UsernameToken>
<Username>username</Username>
<Password>password</Password>
</ns1:UsernameToken>
</ns2:Security>
</env:Header>
<env:Body />
</env:Envelope>
3.2.3.1 Response
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:worktime:v1.0">
<env:Body>
<ns1:AllStates>
<InStates>
<States>
<State>
<Id>1</Id>
<Name>Stamp in</Name>
<EstimatedReturnTimeRequired>false</EstimatedReturnTimeRequired>
</State>
</States>
</InStates>
<OutStates>
<States>
<State>
<Id>1</Id>
<Name>Stamp out</Name>
</State>
<State>
<Id>2</Id>
<Name>Vacation</Name>
</State>
<State>
<Id>3</Id>
<Name>Other</Name>
</State>
<State>
<Id>4</Id>
<Name>Sick leave</Name>
</State>
<State>
<Id>5</Id>
<Name>Away</Name>
</State>
</States>
</OutStates>
</ns1:AllStates>
</env:Body>
</env:Envelope>
3.2.4 GetPersons
3.2.4.1 Request
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:worktime:v1.0" xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns3="wsse">
<env:Header>
<ns3:Security>
<ns2:UsernameToken>
<Username>username</Username>
<Password>password</Password>
</ns2:UsernameToken>
</ns3:Security>
</env:Header>
<env:Body>
<ns1:GetPersons />
</env:Body>
</env:Envelope>
3.2.4.2 Response
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:worktime:v1.0">
<env:Body>
<ns1:Persons>
<Persons>
<Person>
<Id>37813</Id>
<Name>ws-time ws-time</Name>
<IsAdmin>true</IsAdmin>
<NFC></NFC>
</Person>
</Persons>
</ns1:Persons>
</env:Body>
</env:Envelope>
3.2.5 GetStamp
3.2.5.1 Request
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:worktime:v1.0" xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns3="wsse">
<env:Header>
<ns3:Security>
<ns2:UsernameToken>
<Username>username</Username>
<Password>password</Password>
</ns2:UsernameToken>
</ns3:Security>
</env:Header>
<env:Body>
<ns1:GetStamp>
<PersonIdentifier>
<Username>ws-time</Username>
<Password>ws-time</Password>
</PersonIdentifier>
</ns1:GetStamp>
</env:Body>
</env:Envelope>
3.2.5.2 Response
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:worktime:v1.0">
<env:Body>
<ns1:GetStampResponse>
<CurrentState>Out</CurrentState>
<IsAdmin>false</IsAdmin>
<States>
<State>
<Id>1</Id>
<Name>Stamp in</Name>
<EstimatedReturnTimeRequired>false</EstimatedReturnTimeRequired>
</State>
</States>
<Stamp>
<StateId>1</StateId>
<WorkDescription></WorkDescription>
<ProjectNumber></ProjectNumber>
<ProjectDescription></ProjectDescription>
<CostCenter>0</CostCenter>
<CostCenterDescription></CostCenterDescription>
</Stamp>
<PersonInfo>
<Person>
<Id>37813</Id>
<Name>ws-time ws-time</Name>
<IsAdmin>false</IsAdmin>
<CostCenter>0</CostCenter>
<StampMethod>Manual</StampMethod>
</Person>
</PersonInfo>
<WorkTimeInfo>
<Date>2017-06-20</Date>
<WeekSum>0:00</WeekSum>
<TotalFlexitimeSaldo>0:00</TotalFlexitimeSaldo>
</WorkTimeInfo>
</ns1:GetStampResponse>
</env:Body>
</env:Envelope>
3.2.6 GetStates
3.2.6.1 Request
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:worktime:v1.0" xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns3="wsse">
<env:Header>
<ns3:Security>
<ns2:UsernameToken>
<Username>username</Username>
<Password>password</Password>
</ns2:UsernameToken>
</ns3:Security>
</env:Header>
<env:Body>
<ns1:GetStates>
<PersonIdentifier>
<Username>ws-time</Username>
<Password>ws-time</Password>
</PersonIdentifier>
</ns1:GetStates>
</env:Body>
</env:Envelope>
3.2.6.2 Response
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:worktime:v1.0">
<env:Body>
<ns1:States>
<States>
<State>
<Id>1</Id>
<Name>Stamp in</Name>
<EstimatedReturnTimeRequired>false</EstimatedReturnTimeRequired>
</State>
</States>
<CurrentState>Out</CurrentState>
<WorkTimeInfo>
<Date>2017-06-20</Date>
<DateSum></DateSum>
<WeekSum>0:00</WeekSum>
<DateFlexitimeSaldo></DateFlexitimeSaldo>
<TotalFlexitimeSaldo>0:00</TotalFlexitimeSaldo>
</WorkTimeInfo>
<IsAdmin>false</IsAdmin>
<PersonInfo>
<Person>
<Id>37813</Id>
<Name>ws-time ws-time</Name>
<IsAdmin>false</IsAdmin>
<CostCenter>0</CostCenter>
<StampMethod>Manual</StampMethod>
</Person>
</PersonInfo>
</ns1:States>
</env:Body>
</env:Envelope>
3.2.7 GetWorkDescriptions
3.2.7.1 Request
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:worktime:v1.0" xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns3="wsse">
<env:Header>
<ns3:Security>
<ns2:UsernameToken>
<Username>username</Username>
<Password>password</Password>
</ns2:UsernameToken>
</ns3:Security>
</env:Header>
<env:Body>
<ns1:GetWorkDescriptions>
<Type>TimeStamp</Type>
</ns1:GetWorkDescriptions>
</env:Body>
</env:Envelope>
3.2.7.2 Response
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:worktime:v1.0">
<env:Body>
<ns1:WorkDescriptions>
<WorkDescriptions>
<WorkDescription>
<Id>22</Id>
<Title>Text</Title>
<Description>Text</Description>
<Default>true</Default>
</WorkDescription>
</WorkDescriptions>
</ns1:WorkDescriptions>
</env:Body>
</env:Envelope>
3.2.8 PairPersonToNFC
3.2.8.1 Request
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:worktime:v1.0" xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns3="wsse">
<env:Header>
<ns3:Security>
<ns2:UsernameToken>
<Username>username</Username>
<Password>password</Password>
</ns2:UsernameToken>
</ns3:Security>
</env:Header>
<env:Body>
<ns1:PairPersonToNFC>
<PersonId>37813</PersonId>
<PersonNFC>04:2E:D2:E2:BB:2B:80</PersonNFC>
</ns1:PairPersonToNFC>
</env:Body>
</env:Envelope>
3.2.8.2 Response
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body />
</env:Envelope>
3.2.9 Stamp
3.2.9.1 Request
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:worktime:v1.0" xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns3="wsse">
<env:Header>
<ns3:Security>
<ns2:UsernameToken>
<Username>username</Username>
<Password>password</Password>
</ns2:UsernameToken>
</ns3:Security>
</env:Header>
<env:Body>
<ns1:Stamp>
<PersonIdentifier>
<NFC>04:2E:D2:E2:BB:2B:80</NFC>
</PersonIdentifier>
<StateId>1</StateId>
<Attachments>
<Attachment>
<Data>Wm05dg==</Data>
<Filename>bar.txt</Filename>
<Mimetype>text/plain</Mimetype>
</Attachment>
<Attachment>
<Data>WW1GeQ==</Data>
<Filename>foo.txt</Filename>
<Mimetype>text/plain</Mimetype>
</Attachment>
</Attachments>
<Location>
<Longitude>11.403967</Longitude>
<Latitude>11.533521</Latitude>
<Timestamp>2016-07-24T16:00:00</Timestamp>
</Location>
<WorkDescription>Text</WorkDescription>
<ProjectNumber>1</ProjectNumber>
<CostCenter>1</CostCenter>
</ns1:Stamp>
</env:Body>
</env:Envelope>
3.2.9.2 Response
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:worktime:v1.0">
<env:Body>
<ns1:WorkTimeInfo>
<Date>2017-06-20</Date>
<DateSum>0:00</DateSum>
<WeekSum>0:00</WeekSum>
<DateFlexitimeSaldo>0:00</DateFlexitimeSaldo>
<TotalFlexitimeSaldo>0:00</TotalFlexitimeSaldo>
</ns1:WorkTimeInfo>
</env:Body>
</env:Envelope>