Search in sources :

Example 1 with SoapBimServerClientFactory

use of org.bimserver.client.soap.SoapBimServerClientFactory in project BIMserver by opensourceBIM.

the class LocalDevSetup method setupSoap.

public static final BimServerClientInterface setupSoap(String address) {
    try {
        Path home = Paths.get("home");
        Path tmp = home.resolve("tmp");
        PluginManager pluginManager = LocalDevPluginLoader.createPluginManager(home);
        MetaDataManager metaDataManager = new MetaDataManager(tmp);
        pluginManager.setMetaDataManager(metaDataManager);
        try (BimServerClientFactory factory = new SoapBimServerClientFactory(metaDataManager, address)) {
            return factory.create(new UsernamePasswordAuthenticationInfo("admin@bimserver.org", "admin"));
        } catch (Exception e) {
            LOGGER.error("", e);
        }
    } catch (PluginException e) {
        LOGGER.error("", e);
    }
    return null;
}
Also used : Path(java.nio.file.Path) PluginManager(org.bimserver.plugins.PluginManager) UsernamePasswordAuthenticationInfo(org.bimserver.shared.UsernamePasswordAuthenticationInfo) PluginException(org.bimserver.shared.exceptions.PluginException) SoapBimServerClientFactory(org.bimserver.client.soap.SoapBimServerClientFactory) MetaDataManager(org.bimserver.emf.MetaDataManager) ProtocolBuffersBimServerClientFactory(org.bimserver.client.protocolbuffers.ProtocolBuffersBimServerClientFactory) JsonBimServerClientFactory(org.bimserver.client.json.JsonBimServerClientFactory) BimServerClientFactory(org.bimserver.shared.BimServerClientFactory) SoapBimServerClientFactory(org.bimserver.client.soap.SoapBimServerClientFactory) ChannelConnectionException(org.bimserver.shared.ChannelConnectionException) PluginException(org.bimserver.shared.exceptions.PluginException) BimServerClientException(org.bimserver.shared.exceptions.BimServerClientException) ServiceException(org.bimserver.shared.exceptions.ServiceException) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 Path (java.nio.file.Path)1 JsonBimServerClientFactory (org.bimserver.client.json.JsonBimServerClientFactory)1 ProtocolBuffersBimServerClientFactory (org.bimserver.client.protocolbuffers.ProtocolBuffersBimServerClientFactory)1 SoapBimServerClientFactory (org.bimserver.client.soap.SoapBimServerClientFactory)1 MetaDataManager (org.bimserver.emf.MetaDataManager)1 PluginManager (org.bimserver.plugins.PluginManager)1 BimServerClientFactory (org.bimserver.shared.BimServerClientFactory)1 ChannelConnectionException (org.bimserver.shared.ChannelConnectionException)1 UsernamePasswordAuthenticationInfo (org.bimserver.shared.UsernamePasswordAuthenticationInfo)1 BimServerClientException (org.bimserver.shared.exceptions.BimServerClientException)1 PluginException (org.bimserver.shared.exceptions.PluginException)1 ServiceException (org.bimserver.shared.exceptions.ServiceException)1