Skip navigation links

JWitsml - April 2023

JWitsml is a powerful and complete, yet extremely simple API for accessing real-time WITSML data on remote servers.

See: Description

Packages 
Package Description
Energistics  
Energistics.Datatypes  
Energistics.Datatypes.ChannelData  
Energistics.Datatypes.Object  
Energistics.Protocol.ChannelDataFrame  
Energistics.Protocol.ChannelStreaming  
Energistics.Protocol.Core  
Energistics.Protocol.DataArray  
Energistics.Protocol.Discovery  
Energistics.Protocol.GrowingObject  
Energistics.Protocol.Store  
Energistics.Protocol.StoreNotification  
Energistics.Protocol.WitsmlSoap  
no.petroware.jwitsml  
no.petroware.jwitsml.etp  
no.petroware.jwitsml.model  
no.petroware.jwitsml.units  
no.petroware.jwitsml.util  
no.petroware.jwitsml.v13  
no.petroware.jwitsml.v14  
no.petroware.jwitsml.v20  
JWitsml is a powerful and complete, yet extremely simple API for accessing real-time WITSML data on remote servers.

JWitsml can be used for:

All WITSML types exists as Java classes in the no.petroware.jwitsml.model package. The classes contains getters and setters for all their properties according to the given WITSML specification.

JWitsml supports WITSML version 1.3, 1.4. and 2.0.

Start working with JWitsml by creating a WitsmlServer instance that represents the WITSML server in the client program:

// Identify ourself and our capabilities as WITSML client
Capabilities clientCapabilities = new Capabilities(WitsmlVersion.VERSION_1_4_0,
                                                   "First And Lastname",
                                                   "e-mail@some.org",
                                                   "+12 34 56 789",
                                                   "Description",
                                                   "Application Name",
                                                   "Vendor",
                                                   "Version Number");
// Establish URL to the server
URL url = new URL("http://path/to/witsml/server");

// Create the WITSML server instance
WitsmlServer witsmlServer = new WitsmlServer(url, "userName""password",
                                             clientCapabilities);
Use the WitsmlServer instance to create, read, update or delete (CRUD) real-time data.

Example 1: Reading WITSML data:

// Get all wells from the server
List<WitsmlWell> wells = witsmlServer.get(WitsmlWell.classnew WitsmlQuery());

// Get all wellbores of a given well
List<WitsmlWellbore> wellbores = witsmlServer.get(WitsmlWellbore.classnew WitsmlQuery(), well);

// Get all trajectories for a given wellbore
List<WitsmlTrajectory> trajectories = witsmlServer.get(WitsmlTrajectory.classnew WitsmlQuery(), wellbore);

// Get a specific wellbore from the server
WitsmlWellbore wellbore = witsmlServer.getOne(WitsmlWellbore.classnew WitsmlQuery(), "WB-1234", well);

// Get only the name of a known well, and then query for more properties later
WitsmlQuery q1 = new WitsmlQuery();
q1.includeElement("name")
WitsmlWell well = witsmlServer.getOne(WitsmlWell.class, q1, "W-1234");

WitsmlQuery q2 = new WitsmlQuery();
q2.includeElement("field");
q2.includeElement("block");
witsmlServer.refresh(well, q2);

Example 2: Adding WITSML data:

// Add a new rig instance to the server
WitsmlRig rig = witsmlServer.newInstance(WitsmlRig.class"my rig", wellbore);
rig.setType(WitsmlRig.Type.JACKUP_RIG);
rig.setOwner("BP");
:
witsmlServer.add(rig);

Example 3: Updating WITSML data:

// Get a known tubular instance, modify it and write it back to the server
WitsmlTubular tubular = witsmlServer.getOne(WitsmlTubular.classnew WitsmlQuery(), "T-1234", wellbore);
tubular.setType(WitsmlTubular.Type.CORING);
tubular.setHoleDiameter(new Value(8.2, "in"));
tubular.setNuclearTool(false);
witsmlServer.update(tubular);

Example 4: Deleting WITSML data:

// Delete a known BHA run from the server
WitsmlBhaRun bhaRun = witsmlServer.getOne(WitsmlBhaRun.classnew WitsmlQuery(), "B-679", wellbore);
witsmlServer.delete(bhaRun);
Skip navigation links

Copyright © 2023 Petroware AS - https://petroware.no