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

Request (Input Data from Input Device

Page 21 highlights

Chapter 3 Request and Response Request (Input Data from Input Device) 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 When data is input from the input device, the TM intelligent printer formats the input data received from the input device in ePOS-Device XML format and sends a HTTP POST request as shown below to the Web server. 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 Value The ID set with WebConfig (p. 17) 3 Data 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_scannerXXXXXX ondataX 21

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

21
Chapter 3
Request and Response
3
Request (Input Data from Input Device)
When data is input from the input device, the TM intelligent printer formats the input data received from the
input device in ePOS-Device XML format and sends a HTTP POST request as shown below to the Web server.
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
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
1.1 : HTTP Request
(Input Data)
1.1.1 : Create XML from a
database or
other system
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><input>XXXXXX</input>
<type>ondata</type></data><data_id>X</data_id></device_data>
Header