From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using web services in Labview

Hi!

 

I try to use http://zone.ni.com/devzone/cda/tut/p/id/7350 Calculator - web service by Labview vi. When I run my call sum.vi I get "Error 66 occurred at TCP Read in NI_InternetTK_Common_VIs.lvlib:TCP Buffered Read.vi:2->NI_InternetTK_Core_VIs.lvlib:URL Get HTTP Document.vi:1->call sum.vi" - error message. When I put url: "http://localhost/Math/Sum/3/1"- in browser I get answer to the browser but I want to call that service from vi.

 

How can I use Labview web services inside Labview?

 

 

0 Kudos
Message 1 of 5
(2,941 Views)
When you send a VI for review, please send all subVI's as well; it is difficult to troubleshoot your problem otherwise.
CLD | CTD
LabVIEW 2011 SP1 | TestStand 4.5
0 Kudos
Message 2 of 5
(2,926 Views)

I'm sorry "URL get HTTP Document.vi" is from Internet toolkit. I have NI Academic Site License which includes almost all Labview software.

0 Kudos
Message 3 of 5
(2,904 Views)

Hi,

 

you are trying to connect to a webserver on your computer (i. e. localhost) and I guess you don't have any installed. Try another address and make sure that Windows does not block LabView to access the internet.

 

Jörn

0 Kudos
Message 4 of 5
(2,899 Views)

Jörn wrote:

Hi,

 

you are trying to connect to a webserver on your computer (i. e. localhost) and I guess you don't have any installed. Try another address and make sure that Windows does not block LabView to access the internet.

 

Jörn


Yes I try to connect localhost. I think that I have Labview webserver running because I can connect it by web browser (http://localhost)  and this calculator- web service (http:/localhost/math/sum/2/3) is running and I can call it by web browser.

 

From different computer:

1. By browser everthing is ok and I get answer from calculator- web service and see Labview webserver front page.

2. By Labview Vi (call sum.vi) I get same Error 66.

    - Server side  access.log says:

       "xxx.xxx.xxx.xxx - - [Thu Jun 25 11:34:21 2009] "GET /math/sum/1/2 HTTP/1.0" 200 295"

       where xxx.xxx.xxx.xxx is client computer ip.

 

I think that client vi can connet to the server.

 

I can read normal web pages from Labview Vi and get web page source. Could this be the problem?

 

When I call service from browser Log say:

"xxx.xxx.xxx.xxx - - [Thu Jun 25 12:16:51 2009] "GET /math/sum/1/2 HTTP/1.1" 200 295"

 

From Labview vi HTTP/1.0 and from Browser HTTP/1.1 ?

0 Kudos
Message 5 of 5
(2,892 Views)