LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

build web service with internet toolkit vi

I am trying to transition some cgi's we've written based on the LabVIEW Internet Toolkit (ITK) into LV 2009 Web Services, but the web service never deploys properly.  It seems related to having VI's from the ITK on the diagram of the web service VI.

 

Has anyone successfully built a (LV 2009) web service using sub-VI's that are within the Internet Toolkit? 

 

TIA,

James

0 Kudos
Message 1 of 4
(2,870 Views)

Hey James,

 

You'll have to excuse me, but what do you mean by cgi's? You mention that the web service never deploys properly; are you getting errors? If so what are these errors? If it is simply not working as expected, what are you seeing and what are you expecting? Do you have a simple example that you could share with everyone that demonstrates the issues combining ITK VI's and the web service VI?

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 2 of 4
(2,851 Views)

Hi Ben,

Thanks for the input.  I guess my post was about as clear as mud!

 

We've got an application that's built around the NI ITK and the G web server.  Our impression was that the primary reason for being for the G web server was to provide a "CGI-like" (i.e., common gateway interface) framework where the CGI code modules could be built out of VIs.  So we marched steadily down that path and created an application which wraps the G web server and several of our VIs acting as CGI code modules.

 

The way I think about how it works is this...

 

1.  Our application (basically G web server) sits and listens for incoming HTTP requests (e.g. from a web browser "somewhere" on the network)

 

2.  The web server has VI-server access to a library of VIs (our "CGI" code modules).  When particular requests come in, the web server can parse out which particular VI to load and run, which will in turn respond to the request with some kind of formatted information (e.g. a web page).

 

This is all fine and dandy except when you consider that today (LV 2009) we have a full-fledged, scalable, and most importantly self-contained web server that provides the web service framework.  Essentially providing the same kind of application structure for us without the maintenance worries (over the years we've stripped down the GWS that ships as our product and modified it considerably).

 

So now I'm looking at rewriting our library of VI/CGI modules into proper web services. I do have a small example of an "about" service (VI) that simply returns some information about the server, environment, etc, but need some time to finish some additional tests I'm trying to get it to deploy as a service.

 

Here's what happens when I build and deploy the converted CGI:

 

1)  Build - no errors - the .lvws appears in the correct spot designated in the build specification.  The zipped library appears to be intact when I do a little bit of probing and loading.

 

2)  Deploy - no errors - the .lvws attempts to deploy to the web services folder, and gets picked up by the automated installer (i.e., transferred from the "install" to the "deployed" location), however the installed footprint of the service is basically missing all contents except for some folder hierarchy.  

 

I'm trying to pare out the internet toolkit (vi.lib/addons/internet) libraries that are still linked to the service to see if that allows deploy.  I was curious to see if these sorts of issues had come up in anyone else's attempts to convert the GWS/ITK into modern LVWS.

 

Thanks again,

James

0 Kudos
Message 3 of 4
(2,846 Views)

I may have answered my own question.  Messing about a bit further lead me to look at the deployed folder hierarchy of the failed web service deployment.  It was a fairly deep structure but looked truncated with no sub-folder contents:

 

Truncated Web Service Deployement

This got me to thinking about something I'd seen earlier regarding the changes in the way LV 2009 stores paths in built modules.

 

I remembered there was an advanced setting in the build specification to "Use LabVIEW 8.x file layout".  After selecting this attribute, the web service seemed to build and deploy properly.

 

It's early in the game, but at least I can push forward again.

 

James

Message 4 of 4
(2,839 Views)