Skip to content

BimServerClient

Ruben de Laat edited this page Jul 9, 2013 · 30 revisions

Introduction

To connect to a BIMserver you can use one of the 3 protocols: SOAP, JSON or Protocol Buffers. To make connecting to a BIMserver even easier, there also is a Java library you can use.

Get the client library

You can download a nightly build [http://tools.bimtoolset.org/BIMserver/nightly%20builds/ here], select the latest date, and then the file named "bimserver-client-lib-[data].zip".

Extract the zipfile, copy the jar files from the "lib" and "dep" folders to your own project and include them in the build path.

Of course you can also use the client from source code, in that case download a source zip file, or checkout the projects from SVN.

= Example connecting via SOAP with authentication, and listing all projects =

	// Create a BimServerClientFactory, change Json to ProtocolBuffers or Soap if you like
	BimServerClientFactory factory = new JsonBimServerClientFactory("http://localhost:8080");
			
	// Create a new BimServerClient with authentication
	BimServerClient bimServerClient = factory.create(new UsernamePasswordAuthenticationInfo("[email protected]", "admin"));

The other protocols work in a similar way (just use connectProtocolBuffers or connectJson).

Clone this wiki locally