I have a task to build an application online which would allow printing labels through Dymo LabelWriter 450 Turbo printer. The goal of this application is - company employees submit data to that needs to be on stickers via website and when they click 'print', all the labels are printed by one of the office machines.
After launching Dymo web service on the mentioned machines, I am able to print labels if I click print while I am in those machines through JavaScript API that Dymo provides, however if I try accessing the script that I wrote from other computers on a network, printing does not work. This is due to the fact that JavaScript API points to 'localhost'. I downloaded JavaScript API locally and replaced 'localhost' in it with the IP addresses of machines on a network, but now, API when trying to access web service times out. Is there any way of solving this?
Here is visualization of how everything works:
-------------------------------------------------
| Local machine, 198.168.0.1 |
| |
| Dymo webservice runs here. |
| |
| If JavaScript API is run, it communicates |
| with webservice without any problems, |
| printing works. API points to 'localhost' |
| |
-------------------------------------------------
Here is visualization of what I want to do, but what doesn't work because API times out when trying to communicate to web service:
-------------------------------------------------
| Local machine, 198.168.0.1 |
| |
| Dymo webservice runs here. |
| |
-------------------------------------------------
|
| LAN
|
-------------------------------------------------
| Local machine, 198.168.0.2 |
| |
| Javascript API is downloaded here and |
| 'localhost' is replaced to 198.168.0.1 |
| |
| After user accesses a webpage and clicks print,|
| API tries to contact web service, but times out|
| |
-------------------------------------------------
Thank you in advance!