A web socket server application. The application listen to the default web socket port and get a connection from a web socket client.
The application receive a json payload as described below and validate the json schema.
In case of successful validation, a json response will be sent back to the client with the same batch_id as was received in the input json.
In case of failure in one of the validations rule a json response will be sent back to the client with the error description.
Upon a request to the client, both request and response json files logged in a local directory.
{
"action": {
"method": "traffilog_task_1_http",
"parameters": {
"batch_id": 10,
"vehicle_id": 1234578,
"timestamp": "2020-11-15T15:50:38.000"
}
}
}
Parameter name | Type | Mandatory | Description |
---|---|---|---|
method | String (100) | TRUE | |
batch_id | Number | TRUE | |
vehicle_id | Number | FALSE | |
Timestamp | Date time | TRUE | Cannot be a future date |
{
"action": {
"method ": "traffilog_task_1_http",
"response": {
"batch_id": 10,
"status": "OK",
"description": "SUCCESS"
}
}
}
{
"action": {
"method ": "traffilog_task_1_http",
"response": {
"status": "ERROR",
"description": "Missing Mandatory Field"
}
}
}
"description" field:
- Missing Mandatory Field
- Validation Error