LabVIEW Web UI Builder and Data Dashboard

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems connecting to Web Service

Hello there,

 

I have followed the NI tutorial and created the basic calculator webservice. I am having a problem connecting to the service which I am hoping somebody might be able to help me with.

 

- I can sucessfully access the service from the browser of the PC where it is hosted, using http://localhost/WebService/sum/3/6 for example

- I can also successfully access the service from another PC at work using http://10.1.8.205:8080/WebService/sum/3/6

 

Note: All the computers that I have tried it on at work are on the same domain.

 

Now, what I want to be able to do is access the webservice from my smartphone.  My smartphone is not allowed and will never be allowed access to the work wireless network which is fine, I intend to create a separate wireless network later.  So, as a trial I took my work PC and smartphone home and they both connected to my home wireless router.

- Now I can confirm the webservice is still running on the laptop and I check the home ip address which is 192.168.1.73 say.

- From my phone and then from another laptop I try and browse to http://192.168.1.73/WebService/Sum/3/6 and it will not connect

- I also try and connect from Data Dashboard and it will not connect

- From my phone and another laptop I can sucessfully ping the work laptop hosting the service.

 

I tried adding more exceptions to the firewall and opening port 8080 (blndly, I don't understand all this network stuff but I read it on the NI site) but it makes no difference.

 

I do not understand fully the concept of the domain but I am wondering if the issue is that even when I log on to my work PC at home I am logging on to a domain which my phone/home laptop are not on.  I am wondering if only machines on the same domain can access the webservice for example?  If so are there any ways round this?

 

Any help would be very much appreciated. 

 

Thanks,

 

 

Martin

0 Kudos
Message 1 of 16
(10,456 Views)

Just to clarify - at home you said you tried to connect to http://192.168.1.73/WebService/Sum/3/6 and it didn't work. Did you mean http://192.168.1.73:8080/WebService/Sum/3/6 (port 8080)?

0 Kudos
Message 2 of 16
(10,444 Views)
Ahh, yes I did - that was a typo.
Thanks,
Martin
0 Kudos
Message 3 of 16
(10,441 Views)

Unfortunately I can't really think of many suggestions. If your work laptop and the phone are on the same wifi network (even if your work laptop is usually on a domain), I think they should be able to communicate without a problem. (You stating that the phone can ping the work laptop suggests that this is the case.) So at that point, if you can reach the laptop in general, just not the web service, I would think it's a firewall issue.

 

If you can hit the web service from a browser on a given phone, at that point Data Dashboard should be able to communicate with it too.

0 Kudos
Message 4 of 16
(10,435 Views)

Thank you for the reply, it is very helpful.  My plan is to use a TP-Link Nano router so I will progress on and buy that in case I'm trying to solve a problem that doesn't need solving with my home router.

Thanks,

Martin

0 Kudos
Message 5 of 16
(10,429 Views)

Hi,

 

I have followed a NI tutorial to create a Web server too, however I have some troubles when I tried to deploy the Web Service to a different computer on a different network. What can I do? I also tried using the http://ip:port/Webservice... but the page doesn´t load. 

0 Kudos
Message 6 of 16
(10,059 Views)

How did you attempt to deploy the web service on the new machine.  Did you move the whole project over and deploy from there?  Did you try to package your Web service in an installer?  Detailed steps of what you have tried and the results of each will aid greatly in the timely resolution of your issue.

Mark
NI App Software R&D
0 Kudos
Message 7 of 16
(10,039 Views)

No, I didn´t. Do I have to package my Web service in an installer, and then install it on a different computer to run the VI on it? 

 

Well I want to do 2 things, the first one is to run a VI on a different computer on a different network.

 

What I did first was create a VI and then use the publishing tool after enable the remote control on options, so I got http://localhost:8000/VIname, then I tried to change it to http://ip:8000/VIname to browse it on a different computer on a differert network, but it didn´t work.

 

Later I created a proyect, added a VI, and a Web service as the Web service tutorial, and then I deployed it. So my link was  http://localhost:8000/Webservice/Viname but  I also tried with my ip on a different computer on a different network and it didn´t work.

 

 

 

 

 

0 Kudos
Message 8 of 16
(10,029 Views)

I think you're a bit confused, but I don't blame you. The web publishing tool is totally different from the web services feature. Web publishing is for using the browser plugin to remotely view and interact with a running VI's front panel. That only works on a desktop (not in Data Dashboard). The web publishing tool uses port 8000 by default, and has the URL scheme you pasted.

 

Web Services are for creating an API which is callable through a web server. The default port for web services in LabVIEW is 8080, and they typically look like this: http://server:8080/ServiceName/MethodName.

 

Either way, if you move to another machine you have to do something to "deploy". For web services that means opening the project, right-clicking on the build spec, and choosing build and then deploy. For the browser plugin you just have to go through the web publishing tool again on the new machine.

0 Kudos
Message 9 of 16
(10,023 Views)

 

OK ok, sorry for my confusion, and thanks for clear my mind. So now my problem is with the web server. A few days ago I followed the NI data dashboard tutorial to use with the web server, first I tried the connection with the same network and it worked, but later when I tried the data dashboard with a different network, it never loaded my ip. I built and deployed the web server and deactivated the firewall.

 

Thank´s for your help

0 Kudos
Message 10 of 16
(10,016 Views)