LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

web service application instance

Solved!
Go to solution

I am building a LV2009 web services application (main.exe + web services).  The web service VI's share globals with the main.exe.  I think that the web services run under a separate application instance, therefore using globals will not work directly.  My idea was to wrap the global calls on the web service side inside of VI server calls to main.exe.

 

Here's what I was thinking:

Wrap Version Global VI

So, to get this to work properly, I open an application reference (default port 3363) and VI reference (VI is in memory in the main.exe).  I read the global control value, close the references, and convert the control value into the correct data type.

 

From all that I read, I should be able to do all this within the LabVIEW development environemnt with the service deployed to the local machine. My LV has both the web server and VI server (port 3363) enabled.

 

I built and deployed the service VI after first disabling the VI server within the service's project (I'm not really sure that this really matters).

 

I run my main.exe (.vi) and attempt to call the service, but I get error 1004 (Open VI Reference - VI not in memory).

 

I guess my problem seems to lay around the "Open Application"...how should I open an application reference from a web services VI?

 

TIA,

James

0 Kudos
Message 1 of 3
(2,931 Views)
Solution
Accepted by topic author james brunner
Even though it's on the local machine, you need to supply the machine name or IP address ("localhost" should work).  Otherwise you'll just get a connection to the local application instance (see the help), which, of course, doesn't help you communicate across instances.
Message 2 of 3
(2,928 Views)
That looks like a correct solution, thank you.
0 Kudos
Message 3 of 3
(2,925 Views)