dcp = dcp.substring(index + 1).trim();
rootOid = dcp.trim().trim();
}
ServiceManager serviceManager = new ServiceManager();
serviceManager.addFactories(neededServices);
XAcceptor xAcceptor = (XAcceptor)UnoRuntime.queryInterface(XAcceptor.class, serviceManager.createInstance("com.sun.star.connection.Acceptor"));
System.err.println("waiting for connect...");
while( true )
{
XConnection xConnection = xAcceptor.accept(conDcp);
System.out.println( xConnection.getDescription() );
XBridgeFactory xBridgeFactory = (XBridgeFactory)UnoRuntime.queryInterface(XBridgeFactory.class, serviceManager.createInstance("com.sun.star.bridge.BridgeFactory"));
XBridge xBridge = xBridgeFactory.createBridge(conDcp + ";" + protDcp, protDcp, xConnection, new InstanceProvider(serviceManager, rootOid));
}
}