Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

LabVIEW Web Services (Windows, ETS, VxWorks)

LabVIEW 2010 Help

Edition Date: June 2010

Part Number: 371361G-01

»View Product Info

Use LabVIEW Web services to exchange data with VIs over a network. Any HTTP-capable Web client, including a standard Web browser, can invoke VIs and exchange data using a URL and standard HTTP methods such as POST. You can conduct application-to-application data exchange between numerous HTTP-capable devices and software from both National Instruments and third parties.

Note  LabVIEW Web services are available only in the LabVIEW Full Development System and the LabVIEW Professional Development System.

Understanding Web Services

The following figure shows the components of a LabVIEW Web services application.

Building a LabVIEW Application to Deploy Remotely Components of a Deployed Application Components of a Deployed Application Using the VIs on the Web Services Palette Configuring, Running, and Managing the Application Web Server NI Distributed System Manager Accessing a Deployed LabVIEW Application HTTP Client VIs Sending Data to a Deployed Application using URLs Creating a Web Service Project and Build Specification Creating a Web Service Project and Build Specification Tutorial: Building and Accessing a LabVIEW Web Service Application

1) LabVIEW Application

Use the LabVIEW project to organize files to deploy on the network as a Web service. The project can include Web method VIs that exchange data with Web clients via HTTP requests. Use VIs on the Web Services palette to implement standard Web functionality such as cookies, HTTP methods, and streaming. You also can add static content such as images and HTML pages to the project, as well as auxiliary VIs that run independently of client requests and do not exchange data with a Web client.

2) Application to Web Services Communication

Web method VIs use the connector pane to exchange data with Web clients. When you create Web method VIs, you must add any controls that exchange data to the connector pane of the VI. If you use VIs on the Web Services palette, you also must add the httpRequestID control to the connector pane.

3) LabVIEW Web Services

After you setup a LabVIEW application capable of exchanging data over the network, you must build and deploy a Web services build specification using the Web Service Properties dialog box. The build specification further determines which files are accessible over the network and establishes the URL that Web clients use to interact with Web method VIs.

After you configure the build specification, you can deploy the entire Web services application to the Application Web Server. The Application Web Server hosts the Web service application on the network and provides multiple security-related features to protect the network data exchange, including Secure Socket Layer (SSL) encryption.

After a you deploy the Web service application, use the NI Distributed System Manager to manage active Web services and security features, such as SSL certificates.

4) Web Services to Web Client Communication

Web clients exchange data with a Web service application by sending HTTP requests to the URLs established in the build specification. A Web service accepts the request and returns data to the Web client via extensible markup language (XML), hypertext markup language (HTML), JavaScript Object Notation (JSON), or text (TXT) format. For example, a Web client might submit a request that contains two numbers to a Web service that determines the sum and returns that value to the client.

5) Web Client

Supported Web clients include any HTTP-enabled platform such as standard Web browsers, HTML forms, third-party software, and VIs that utilize the HTTP Client palette.

Tutorial: Building a Web Service

The tutorial for Building a LabVIEW Web Service Application includes the following tasks:

  • Create VIs for Web services
  • Configure the LabVIEW Web Server
  • Create a Web service project and build specification
  • Deploy a Web service
  • Access a Web service from a Web client

Web Services Examples

Refer to the Address Book project in labview\examples\comm\webservices\address book for an example of a Web service that handles post data, streaming output, static content, and HTML forms.

Refer to the Weather Monitor project in labview\examples\comm\webservices\weather monitor for an example of a Web service that publishes simulated weather statistics.

Refer to the LV Queue Server project in labview\examples\comm\webservices\LVQueue Server for an example of a Web service that exposes LabVIEW queues, which can be useful when creating an application distributed across many nodes.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit