Publishing a Web Service through a Stand-Alone Application (Real-Time, Windows)

Parent Topic: Publishing Web Services

You can publish a Web service to the NI Web Server or Application Web Server through a stand-alone application. The Web service starts/stops running when the application starts/stops running.

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.

Complete the following steps to publish a Web service through a stand-alone application:

  1. Include the Web service in an application:
    1. (Windows) Right-click Build Specifications in the�Project Explorer�window and select�New»Application to launch the�Application Properties�dialog box.

      (Real-Time) Right-click Build Specifications in�Project Explorer and select�New»Real-Time Application to launch the�Real-Time Application Properties�dialog box.
    2. On the�Web Services�page, place a checkmark in the checkbox for the Web service you want to include.
    3. Choose a web server for hosting the Web service. Refer to Hosting Web Services for more information on each web server.
      Note  (Real-Time) You can use only the Application Web Server to host Web services on an RT target because the NI Web Server does not support RT targets.
    4. (Optional) If you choose Application Web Server in step c, configure which port you want to use to accept requests for the Web service. You must configure each application that runs simultaneously to use a unique port. Place a checkmark in the Enable SSL checkbox and configure the other items if you want to allow clients to use HTTPS protocol to call the Web service.
  2. Build the application that contains the Web service:
    1. Click Build and the Build Status dialog box appears.
    2. When LabVIEW completes building the application, click Explore to open the destination directory where LabVIEW saves the application files.
  3. Run the application on the target device so that the Web service starts running on the device:
    1. (Windows) Double-click the executable in the destination directory to run it.

      (Real-Time) Right-click the application you build under Build Specifications in Project Explorer, and click Run as startup.

      The application publishes the Web service to the web server on the target device.
      Note  Publishing Web services to the NI Web Server requires administrator privilege.
    2. Close the�LabVIEW project. Published Web services run on the LabVIEW Runtime and do not depend on the LabVIEW Development System.