LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Web service issue when creating exe

Hi All,

 

I have an issue when I create an executable with my Labview (Labview 2014 version) project that includes a web service.

When I run the project and start the web service within Labview development, there is no issue at all, the Web request (POST) are processed correctly by my Labview project (just one "event.vi" managing a POST on url ../HMI/event.)

 

When I create an executable file, I get an error 404 (Access Error: 404 -- Not Found), meaning the Web Service has started correctly but the vi supposed to manage the web request is not found.

 

I have modified the niembeddedws.conf file so that Web server logs info into an error.log file but I don't find any reason of what's wrong with this project (note that I have another project working correctly with Web Service and I can't see any reason why this one does not work !)

Both files are attached, does someone has an idea of what can be wrong ?

 

Thanks

 

Francis

 

 

 

 

0 Kudos
Message 1 of 8
(2,909 Views)

Hello,
Based on your problem I think this article might be helpful: Hosting Web Services (RT, Windows).

0 Kudos
Message 2 of 8
(2,822 Views)

Hi,

 

Thanks for the article, but it doesn't solve the issue, I didn't found anything it it (and all linked articles) that can explain my issue. This is just an explanation on how labview embeds the WS in an application....

 

Francis

0 Kudos
Message 3 of 8
(2,802 Views)

Hello,
Did you try to execute one of the web-service examples from LabVIEW? If no, please do so. You can find them in the example finder.
And also, can you send your project? It would help significantly with the troubleshooting. 

0 Kudos
Message 4 of 8
(2,777 Views)

Hi,

 

Yes I tried and it is working correctly, as already explained I already built several applications/projects with Labview including a web-service and these are working perfectly. Find attached the project sources as well as the resulting exe built (or you can get it from http://ovh.to/fH1pfMD).

When running the source from labview, you can connect correctly to the web-service doing a POST on http://localhost:8001/HMI/event (with Content-type as application/json)

When running the exe, the web service is supposed to be on port 8002, so need to POST on http://localhost:8002/HMI/event

but I get the following answer : 404 : Not Found - 178 bytes of data returned

 

Thanks,

 

Francis

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

I progressed a little bit.

I was not adding the 'Labview Web Service' object in my 'startup' vi associated to the web server. So creating a Web service Startup vi directly from  the project explorer and doing 'nothing' in it, if I create an exe, the web server is working ok and I no longer get the http 404 error.

So restarting from there and calling my projects vi's from this 'Startup vi' and creating an exe, I am now getting the error -67001 out of the 'Get Web service Status.vi' with the following description

 

-67001

NI_WebServices.lvlib:Error Converter (ErrCode or Status).vi<APPEND>

<b>Complete call chain:</b>
NI_WebServices.lvlib:Error Converter (ErrCode or Status).vi
NI_WebServices.lvlib:Web Service.lvclass:Get Web Service Status.vi
Startup 1.vi

 

and still the http 404 when sending a POST....

0 Kudos
Message 6 of 8
(2,732 Views)

Hello!

To be honest, this issue starts bo quite complicated. Could you please send your project? It would be much easier to help.

Do you include Web Service in build specification? If yes, than with what settings?

0 Kudos
Message 7 of 8
(2,696 Views)

Hi,

 

Thanks for your help but as we need to progress on this topic because delivery of our software is expected soon (and as well because we already spent a lot of time trying to understand the issue.....), we decided to use an external activeX web server component ... and it is working perfectly in less than half a day we succeded to remove the Labview embedded web server from our app and to replace it with the external web server ActiveX. So far the cost of this external component is approx 200€... but compared to the time we already spent, that's nothing....

 

Francis

0 Kudos
Message 8 of 8
(2,656 Views)