Owning Palette: Connectivity VIs and Functions
Requires: Full Development System (Windows). This topic might not match its corresponding palette in LabVIEW depending on your operating system, licensed product(s), and target.
Use the Web Services VIs to build and configure top-level VIs in LabVIEW Web service applications. You can accept and process HTTP requests from Web clients, create HTTP sessions, and perform other tasks associated with Web services communication.
![]() | Note This topic assumes familiarity with the Web services introduction and Building a LabVIEW Web Service Application tutorial. |
| Palette Object | Description |
|---|---|
| Check If Session Exists | Checks if an HTTP session is associated with the current HTTP request. |
| Create Session | Creates an HTTP session for the current HTTP request. |
| Delete Session Variable | Deletes the HTTP session variable associated with the name key. You can create session variables by first establishing an HTTP session with the Create Session VI and then using the Write Session Variable VI to create the variables. |
| Destroy Session | Destroys the HTTP session associated with the current HTTP request. Use the Create Session VI to establish an HTTP session. The status of error in does not affect the functionality of this VI. |
| Flush Output | Sends any remaining data written by the Write Response VI from the buffer to the socket. Use this VI when the top-level VI is configured to use streaming and buffering in the Configure RESTful VI dialog box. The status of error in does not affect the functionality of this VI. |
| Get Session ID Cookie | Returns a client-side cookie for the HTTP session. Client-side cookies allow the server to reuse the same HTTP session when the same Web client submits multiple HTTP requests. You must first establish an HTTP session using the Create Session VI. The cookie remains valid while the browser on the Web client is open. |
| Read All Form Data | Reads the form data values received from the specified HTTP request. This VI processes that form data and assigns those values to elements in a 1D array. Use this VI for requests that use the multipart/form-data encoding type. |
| Read All Request Variables | Reads all request variables associated with the current HTTP request. Web services include over 30 request variables that provide information such as server label, remote address, and cache control related to an HTTP request. |
| Read All Session Variables | Reads all HTTP session variables associated with the current HTTP request. You can create session variables by first establishing an HTTP session with the Create Session VI and then using the Write Session Variable VI to create the variables. |
| Read Form Data | Reads a single form data value associated with the current HTTP request. Use this VI for requests that use the multipart/form-data encoding type. |
| Read Postdata | Reads any post data associated with the current HTTP request. This VI does not handle post data with the multipart/form-data encoding type. Use the Read Form Data VI to handle this encoding type. |
| Read Request Variable | Returns the value for a single request variable associated with the current HTTP request. Web services include over 30 request variables that provide information such as server label, remote address, and cache control related to an HTTP request. |
| Read Session Variable | Reads the value of an HTTP session variable associated with the current HTTP request. You can create session variables by first establishing an HTTP session with the Create Session VI and then using the Write Session Variable VI to create the variables. |
| Read Uploaded Files Info | Returns an array of clusters that contains information about all uploaded files associated with the specified HTTP request. This information includes the client filename, the path to the temporary storage location, the content type, and the size in bytes. |
| Render ESP Template | Executes the specified ESP scripting template. Refer to the Scripting in LabVIEW Web Services topic at ni.com/zone for more information about using scripting with Web services. |
| Set ESP Variable | Sets variables to be visible in an ESP scripting template. You can access these variables from the form variables in the ESP template. Refer to the Scripting in LabVIEW Web Services topic at ni.com/zone for more information about using scripting with Web services. The data type you wire to the value input determines the polymorphic instance to use. |
| Set HTTP Header | Sets an HTTP header in the response stream of the current HTTP request. The top-level VI must be configured to use streaming. Refer to the World Wide Web Consortium Web site at www.w3.org for header field definitions along with example headers, descriptions, and syntax. |
| Set HTTP Redirect | Sets an HTTP header in the response stream of the current HTTP request that redirects the Web client to another URL. You must configure the Web method VI to use streaming. |
| Set HTTP Response Code | Sets the HTTP status code to return to the Web client for the current HTTP request. The response code indicates the outcome or status of the request. The default is HTTP code 200, which indicates a successful request. |
| Set HTTP Response MIME Type | Sets the MIME response type for the current HTTP request. The MIME is a standard method used to indicate the format of the response including text, images, or other application-specific data. |
| Write Response | Writes a streaming response string for top-level VIs configured to use stream output mode in the Configure RESTful VI dialog box. You can write the response to a buffer in memory or to the socket, and the response can be either buffered or unbuffered. If the response is buffered, use the Flush Output VI after this VI to send any remaining data that remains in the buffer. The status of error in does not affect the functionality of this VI. |
| Write Session Variable | Creates or replaces a session variable or set of session variables associated with the current HTTP request. The data type you wire to the value input determines the polymorphic instance to use. |
| Subpalette | Description |
|---|---|
| Utilities VIs | Use the Utilities VIs to escape or unescape characters in a URL or convert images for LabVIEW Web services. |