LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to access a webservice from a different PC

Hello,

 

I downloaded a project that builds an android app to monitor a labview program output.

 

When I run the webservice, and go to my browser on the same pc, I can see an output (as shown in the attached picture), but when I try to access it from another PC (http://IP:8080/webservice/urlMapping), I get a "url not found" error.

 

Anything I am missing, should I change the program to make it run properly?

 

Same thing happened when I ran the application on the android emulator on my pc, I was able to visualize an output, but when I ran the application on my android phone connected to the same network, I got a connection timeout.

I would eventually like to make it work on different networks.

 

The project is also attached.

 

Any help is appreciated.

Download All
0 Kudos
Message 1 of 8
(5,376 Views)

Hi,

 

I tried building and deploying the sample you attached, and it worked fine from several other computers around the office, so I don't think there's anything wrong with your code.

 

Are you able to ping your host computer from both other devices? If you can, I'd start by checking that you've configured your web service server correctly. This tutorial has a step on configuration.

 

After that you'd want to check that you don't have any firewalls blocking your other computer from accessing your webservice.

 

You might also try try building a service that returns a string instead of XML.

 

I hope this helps,

 

Regards,

Luke B.

 

0 Kudos
Message 2 of 8
(5,334 Views)

Hi Luke,

 

I was able to solve the problem, it was related to my server's firewall.

Thank you

0 Kudos
Message 3 of 8
(5,316 Views)

I would like to access my LabVIEW webservice running on my home PC (Windows 7, LV 2011) from a PC at my workplace. From the localhost, everything works fine, but from my workplace PC, I get a timeout. Changing the Windows Firewall settings for LabVIEW 2011 from "blocked" to "allowed" did not change the problem. I am directly connected to a DSL modem at home, there is no router/firewall inbetween.

 

Any hints welcome!

0 Kudos
Message 4 of 8
(5,292 Views)

What I did was:

1- Disable firewall on the server PC (PC running the webservice)

2- Forward the port (in my case 8080) to the IP of the Server PC (do this on the router where you Server PC is connected)

 

 

 

 

0 Kudos
Message 5 of 8
(5,278 Views)

Solution:

The program for which an "allow" rule had to be created in Windows Firewall is the "NI Application Webserver.exe". On my PC with Windows 7 64bit and an older installation of LabVIEW 2010 64bit, only the 64bit version of the NI Application Webserver already had an existing rule in the firewall. Once I created a new "allow" (inbound) rule for the 32bit version, it worked fine.

 

Since I don't have a router, I didn't have to take care of port forwarding.

0 Kudos
Message 6 of 8
(5,255 Views)

Hello!

I ask advice. I try webservice and its work Ok on local net and over WIFI, but i try to access over internet with out success. 

local link http://192.168.1.104:8080/WS/Add?b=2&a=23      work OK

Data Dashboard over WIFI      work OK

i try to use public IP       with out success

i try to connect with out router to internet (use public IP)  - with out success

firewall windows is OFF

 

Any advice?

Thanks!

 

0 Kudos
Message 7 of 8
(3,885 Views)

My problem was that the provider blocked incoming Internet traffic. Now everything works ok. I hope this will be useful to someone!

0 Kudos
Message 8 of 8
(3,833 Views)