|LabVIEW 2014 Help|
|LabVIEW 2015 Help|
|LabVIEW 2016 Help|
|LabVIEW 2017 Help|
|LabVIEW 2018 Help|
Parent Topic: Components of a Web Service
|Note For more information about concepts in this topic, refer to the Web services introduction and tutorial. LabVIEW Web services are available only in the LabVIEW Full Development System and the LabVIEW Professional Development System.|
|Note Before you add static content to a Web service, organize static content on disk in two main folders: one that contains public content and, if necessary, one that contains private content you do not want to expose to users.|
Complete the following steps to integrate static content into a Web service:
After you publish the Web service, you can access the static files from a client, such as a web browser, by navigating to the URL mapping for the file you want to access.
LabVIEW automatically assigns a URL mapping to each public static file. You cannot change this mapping. Complete one of the following steps to view the URL mapping for a public static file:
You can include an index.html file within each public content folder and subfolder in the project. When a client sends an HTTP request using a URL such as http://localhost/TutorialService/, the Web service returns the index.html file.
Complete the following steps to integrate a default index.html file for a specific public content folder:
|Note The file extension must be .html.|
Private static files do not have URL mappings because web clients cannot access private content. To programmatically access private static content within Web service source files, use the Read Service Attribute VI to return the path to the folder that contains private content at run time. With the path to the private content folder, you can build a path to a specific file. Refer to the Read Service Attribute VI help for more information.