LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connection to WebServices using localhost or the IP of the computer

Hello,

 

I have an application which uses the LabVIEW Web Services. I use the browser and I access:

 

http://localhost:8000/rg/index.html where 8000 is the http port (LabView2011). The applications works fine.

 

When I use http://COMPUTER_IP:8000/rg/index.html the page loads but nothing hapens. Is like the WebService is not accessed.

 

I have asked a friend to access this address from another computer and he gets the same thing. The page loads but nothing happens.

 

I am using Labview 2011 and Windows XP.

 

What am I doing wrong? Thank you.

 

 

0 Kudos
Message 1 of 6
(4,556 Views)

>>the page loads but nothing hapens

 

Hi, we need more detail here. What do you see when the page loads? What do you expect to happen?

TailOfGon
Certified LabVIEW Architect 2013
0 Kudos
Message 2 of 6
(4,553 Views)

Hello and thank you for the reply,

 

I have attached 2 images. Image 1 shows the page and the webservice running. If I set the Frequency to a value I should get a sine graph.

 

Image 2 shows the same webpage but if I set the frequency nothing happens. So in my opinion the web service does not respond.

 

Thank you.

Download All
0 Kudos
Message 3 of 6
(4,544 Views)

What happens if you use a loopback ip (127.0.0.1=localhost)? What have you tried and what worked and what didn't?

TailOfGon
Certified LabVIEW Architect 2013
0 Kudos
Message 4 of 6
(4,515 Views)

Hello,

 

So I have reinstalled completely Windows XP and LabView 2011. I have not installed any antivirus and the firewall is disabled.

 

1. I have created a new project, with a new webservice and deployed it.

 

2. For the newly deployed webservice I have opened a browser and accessed the service via:

 

                                     http://localhost:8080/Generator/Main/3        and        http://82.139.123.117:8080/Generator/Main/3

 

I have even asked a friend from a different network to access the webservice and it worked.

 

3. I have installed the Web UI Builder and created an interface for the service, tested the interface, obtained the index.html file from NI (named it rg).

 

4. I have copied this archive to: C:\Program Files\National Instruments\LabVIEW 2011\www, the HTTP port was by default 8000 so I left it like that.

 

5. I have used the address: http://localhost:8000/rg/index.html   and I could see the page but it was no response from the web service (image 1).

 

6. Then I copied the same rg directory to C:/Program Files/National Instruments/Shared/NI WebServer/www/rg/ .

 

7. Now If I access http://localhost:8080/rg/index.html - it works (image 2), http://127.0.0.1:8080/rg/index.html - does not work (image 3), http://82.139.123.117:8080/rg/index.html - does not work (image 4).

 

Image 5 are the settings of my Labview configuration.

 

What do you think, what am I doing wrong?

0 Kudos
Message 5 of 6
(4,498 Views)

Hello,

 

I solved the issue.

 

Instead of using the locally installed Web UI Builder and building your application with a service to which you connect using localhost:8080,

 

I just used the on-line Web UI Builder and connected to the web service using computer IP:8080.

 

I deployed and built the project, then I downloaded the files to my computer. In that way I am able to use the the web service with both calls:

 

http://localhost:8080/expadd/index.html   and  http://145.94.189.210:8080/expadd/index.html

 

Also, I have tried to access it from another computer with http://145.94.189.210:8080/expadd/index.html and it works just fine.

 

Have a nice day.

Message 6 of 6
(4,479 Views)