Epson TM-T20II-i Device Data Notification Users Manual - Page 23

Request (Device Control Execution Result

Page 23 highlights

Chapter 3 Request and Response Request (Device Control Execution Result) Input Device TM Intelligent Printer 1 : Data input occurs Web server 1.1 : HTTP Request (Input Data) HTTP Response (Device Control) 1.1.1 : Create XML from a database or other system 2 : Device Control Execution 3 : HTTP Request (Device Control Execution Result) 3.1 : Register control result HTTP Response (Device Control) to a database or other system 3 The TM intelligent printer executes device control according to the device control data (ePOS-Device XML) received from the Web server, formats the result in ePOS-Device XML format, and sends a HTTP POST request as shown below. The format of request message is URL-encoded form data (application/x-www-form-urlencoded). Set the sending destination according to "Device Data Notification" (p. 17). Parameter ID Data Value The ID set with WebConfig (p. 17) ePOS-Device XML format Header POST /Test_DeviceData.php HTTP/1.1 Host: 192.168.192.10 Content-Type: application/x-www-form-urlencoded Content-Length: xxx ID=&Data=0 local_scanner onxmlresult5 When the TM intelligent printer receives multiple device control data items from the Web server, the TM intelligent printer executes each device control result separately. The device control execution result is sent as one HTTP request (Device Control Execution Result) to the Web server for each device control. 23

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24

23
Chapter 3
Request and Response
3
Request (Device Control Execution Result)
The TM intelligent printer executes device control according to the device control data (ePOS-Device XML)
received from the Web server, formats the result in ePOS-Device XML format, and sends a HTTP POST request
as shown below.
The format of request message is URL-encoded form data (application/x-www-form-urlencoded). Set the
sending destination according to "Device Data Notification" (
p. 17
).
When the TM intelligent printer receives multiple device control data items from the Web server, the TM
intelligent printer executes each device control result separately. The device control execution result is sent
as one HTTP request (Device Control Execution Result) to the Web server for each device control.
Parameter
Value
ID
The ID set with WebConfig (
p. 17
)
Data
ePOS-Device XML format
TM Intelligent Printer
Input Device
Web server
1 : Data input occurs
2 : Device Control Execution
1.1 : HTTP Request
(Input Data)
3 : HTTP Request
(Device Control Execution Result)
1.1.1 : Create XML from a
database or
other system
3.1 : Register control result
to a database or
other system
HTTP Response
(Device Control)
HTTP Response
(Device Control)
POST /Test_DeviceData.php HTTP/1.1
Host: 192.168.192.10
Content-Type: application/x-www-form-urlencoded
Content-Length: xxx
ID=&Data=<device_data><sequence>0</sequence>
<device_id>local_scanner</device_id><data><resultdata>
<response success=”true” code=”” status=”251658262” battery=”0” xmlns=”http://
www.epson-pos.com/schemas/2011/03/epos-print”/></resultdata>
<type>onxmlresult</type></data><data_id>5</data_id></device_data>
Header