Example Code

Implementing WITSML Server Calls w/LabVIEW HTTP Client VIs with aid of SOAP Packets from PDS WITSMLstudio Desktop App

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.


  • LabVIEW

Code and Documents



To the rescue: PDS WITSMLstudio Desktop App provides all the SOAP packets to work trouble-free with LabVIEW HTTP VIS for functon calls to a WITSML Server 1.4.1 as follows:

  • Get Server WITSML Version (OK)
  • Get Server WITSML Capability info (OK)
  • Get Well and Wellbore UIDs and Names (OK)
  • Add or Update log, time, and Trajectory Data objects (OK)
  • Delete uploaded logs or trajectory data objects (OK)
  • Query server for log headers and detailed data rows(OK)

The above comprises all the functions needed to implement WITSML 1.4.1 data streaming for MWD/LWD application using LabVIEW native HTTP client VIs.

Mezintel successfully ran the following LabVIEW HTTP VIs to find that SOAP packets suggested by PDS WITSMLstudio Desktop App all worked on very first try by just copying and pasting the packet to the LabVIEW HTTP POST VI input terminal. See LabVIEW block diagram below.



LabVIEW Implementation by CUTS and PASTE of WMLS_GetCap SOAP packet from PDS WITSMLstudio Desktop Application.

The PDS WITSMLstudio Desktop app can be installed via this link

PDS WITSMLstudio Desktop



This link will take you to a download page that looks as follows:

blobid1701286478764.pngClick the Install Button (link) to get the binary (app) installer.

PDS Studio WITSML has all functions for Logging-in, Get Capability, etc.


These screen shots show establishing a connection and how to implement GET-CAP with the associated SOAP data packet that works with LabVIEW via CUT and PASTE.



Select Server connection by visiting the connection setting option.


After getting connected you can call-up the WITSML server capability info by clicking on the <Get Cap> button. Visit the SOAP Messages TAB shown above to get the SOAP packets full envelope that works error free with LabVIEW HHTP POST VIs.


The Query TAB on the LEFT pane has other Functions such as ADDTOSTore, UpdateInStore, DeleteFromStore as shown here. Any function that you choose to run will show equivalent SOAP packet envelope that works error free with LabVIEW HTTP VIs.


WITSML Quety Tabk showing SOAP packets usable via cut and paste in LabIEW HTTP VIs.


Hierarchy TAB:

The Hierarchy TAB has the Uploaded Well, Wellbore, and data nodes as shown below. In the example shown I have expanded the hierarchy node to show the three data objects uploaded from Mezintel Gamma.



MWDDepth_SEG_, MWD_Time_SEG_4, and Survey_SEG_ are all uploaded by Mezintel Gamma via LabVIEW HTTP POST VIs.



By using PDS WITSMLstudio DESKTOP one can get the SOAP envelope packets needed to implement functions for monitoring and streaming WITSML 1.4.1 data to a WITSML 1.4.1 server using HTTP client LabVIEW VIs.

Using this approach, Mezintel upgrade Mezintel Gamma WITSML client module from WITSML 1.3.1 to WITSML 1.4.1 in one-week.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.