Skip to content
hwinkler edited this page Jun 29, 2012 · 10 revisions

Ruby program and library implementing the WITSML Store interface SOAP client API, aka WMLS. Brought to you by Wellstorm.

Here's a quick start for users:

  1. Install Ruby: http://www.ruby-lang.org/en/downloads/

  2. Install RubyGems: https://rubygems.org/ (Update: ruby installers nowadays do this for you in step 1. You should actually just proceed to step 3, and only come back to this step if "gem" doesn't seem to exist on your system).

  3. From a command line issue this command: gem install wmls

Voilà! You have two things: a) an executable program named wmls, and b) a Ruby library named Wmls you can use in your own programs.

A quick example of using the program is

wmls -r https://witsml.wellstorm.com/witsml/services/store -u myname -p mypass -q path/to/get_all_wells.xml 

That command will retrieve all the objects using a WITSML query template named get_all_wells.xml. Here are the options to wmls:

    -DVARIABLE=VALUE                 Define a substitution variable. Use this multiple times to replace %variable% with value in the template.
    -r, --url url                    URL of the WITSML service
    -u, --username USER              HTTP user name (optional)
    -p, --password PASS              HTTP password (optional)
    -q, --query QUERYFILE            Path to file containing query, delete, add or update template. (optional, default stdin)
    -a, --action ACTION              WITSML action: cap, add, get, update, or delete (optional, default 'get')
    -o, --optionsin OPTIONSIN        optionsIn string (optional)
    -h, --help                       Show this message

To use Wmls from your own programs,

require 'wmls'
wmls = Wmls.new 'https://witsml.wellstorm.com/witsml/services/store', 'myname', 'mypass'
template = '<wells xmlns="http://www.witsml.org/schemas/131"> <well uid=""> <name/> </well></wells>'
status, supp_msg, xml_out = wmls.get_from_store template

Read the full docs here: http://rubydoc.info/gems/wmls/frames

Clone this wiki locally