05-20-2010 11:01 PM
This is a bug report/workaround notice for web services on LabView 2009.
LabView on Windows supports web services. A web service is Labview code that is executed by LabView's embedded web server in response to a URL. The process for building a web service with LabView is similar to the process for building an EXE: VIs are stripped of their block diagram, copied to target location, zipped, and renamed to a .lvws extension. To actually use a web service, it must be "deployed". The act of deploying the web service takes the *.lvws file, unzips it to the web service deployment path, and registers the deployed web service with with the embedded web server.
I have been working on an issue with web services where the service builds and deploys successfully but fails to work (it returns HTTP error 404). The cause of failure is VI path lengths that exceed Windows' MAX_PATH limit. See this thread .
It is easy to exceed MAX_PATH. The web service deployment folder for LV2009 is %CommonAppData%\National Instruments\Web Services 2009 32-bit\User Services\deployed\{web service name}-{37 char GUID} . On XP/2003, %CommonAppData% maps to "C:\Documents and Settings\All Users\Application Data", with the result that the deployment paths are a minimum of 160 characters long before any user VIs are counted. User paths can easily consume the remaining 90-odd characters because web services are deployed with the "preserve disk hierarchy" flag set to true, which means the original hierarchy of VIs is re-created as part of deploying the web service. The full path of, for example, a VI in the commonly-used OpenG Variant Config library is:
C:\Documents and Settings\All Users\Application Data\
National Instruments\Web Services 2009 32-bit\UserServices\deployed\TestWebService-0459F868-AECF-4CBF-81F9-0E67EA27A5D7\internal.llb\
LabVIEW 2009\user.lib\_OpenG.lib\variantconfig\variantconfig.llb\Encode Section and Key Names__ogtk.vi
This is 288 characters, and not a legal WinAPI path. Unlike an EXE, web services are unzipped on the disk prior to execution, so the exceeding MAX_PATH in this manner results in failure during unzipping.
LabView 2009 web service issues:
C:\Documents and Settings\All Users\Application Data\National Instruments\Web Services 2009 32-bit\UserServices\deployed\TestWebService-0459F868-AECF-4CBF-81F9-0E67EA27A5D7\internal.llb\Encode Section and Key Names__ogtk.vi
05-24-2010 09:05 AM
Hello Rob,
I appreciate the effort you have put into this bug report. There was an known bug with this and I have added your information to this report. The number for this bug is 157041. Thank you.
JimS.