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.

Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

Web services under Labview 8.2 & Linux

Hi,

I am developing a new monitoring project, and once again I need your help. I use Labview 8.2 on Ubuntu 8.04 and I need to create a web services in order to exchange data between Labview and a Apache server. As you know web services (package by NI) is not available  for Linux. I would like to use methods of http protocol like get, post, delete, etc. Is it possible to create using data socket (or other way) the method post for example?

Basically my program is always checking if one user has touch one file, if the created date of the file has changed my program will send the measures through the post method on a XML file. I suppose that it is easy to check the creation date of the file using labview code but, how could I "to simulate" the post in order to send the XML file?

Thanks in advance
0 Kudos
Message 1 of 5
(7,897 Views)

You don't want to use datasocket, but you can use the TCP primitives. The protocol for HTTP is documented in RFC 2068 (http://tools.ietf.org/html/rfc2068). That said, if you do some searching you can probably find some existing G implementations of the HTTP protocol.

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

Hi AdamKemp,

thanks for your answer, I have been looking for something in OpenG but without success. If I must build my own http protocol with your suggested link... better I look for a other way using a external code. Nevertheless I have found a way to create the method post and get using soap, but I don't like the solution (.net).

0 Kudos
Message 3 of 5
(3,193 Views)

OpenG has an attempt at a HTTP VI library but not exactly in a state that would warrant release of a package. It has also not been ported to the new SVN repository but should still be available in the old CVS repo. You can also access it through the viewcvs interface http://opengtoolkit.cvs.sourceforge.net/viewvc/opengtoolkit/http/.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 5
(3,193 Views)

SOAP is a lot more complicated then you probably need. I suggest checking out Rolf's link at least as a starting point.

It basically just comes down to figuring out what string you need to send (the format based on the protocol) and then you just create that string and send it over TCP/IP to port 80. The hard part is just figuring out what that string needs to be. There are some plugins to firefox you can use to spy on HTTP messages so you could just simulate it in firefox and see what string it sends, then modify that. Or you can start with an example like Rolf's and modify it as needed.

0 Kudos
Message 5 of 5
(3,193 Views)