import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import org.jwitsml.Capabilities;
import org.jwitsml.WitsmlQuery;
import org.jwitsml.WitsmlServer;
import org.jwitsml.WitsmlServerException;
import org.jwitsml.WitsmlVersion;
import org.jwitsml.WitsmlWell;
public class BasicExample {
public static void main(String[] arguments) {
try {
Capabilities clientCapabilities = new Capabilities(WitsmlVersion.VERSION_1_3_1,
"First And Lastname",
"e-mail@some.org",
"+12 34 56 789",
"Description",
"Application Name",
"Vendor",
"Version Number");
URL url = new URL("http://path/to/witsml/server");
WitsmlServer witsmlServer = new WitsmlServer(url, "userName", "password",
WitsmlVersion.VERSION_1_3_1,
clientCapabilities);
List<WitsmlWell> wells = witsmlServer.get(WitsmlWell.class,
new WitsmlQuery());
for (WitsmlWell well : wells)
System.out.println(well.getName());
}
catch (MalformedURLException exception) {
exception.printStackTrace();
}
catch (WitsmlServerException exception) {
exception.printStackTrace();
}
}
}
No comments:
Post a Comment
Thank you for Commenting Will reply soon ......