XComponentContext xcomponentcontext = null;
XMultiComponentFactory xMultiComponentFactory = getMultiComponentFactory();
// create a connector, so that it can contact the office
Object xUrlResolver = xMultiComponentFactory.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", xcomponentcontext);
XUnoUrlResolver urlResolver = (XUnoUrlResolver) UnoRuntime.queryInterface(XUnoUrlResolver.class, xUrlResolver);
Object rInitialObject = urlResolver.resolve(connectStr);
XNamingService rName = (XNamingService) UnoRuntime.queryInterface(XNamingService.class, rInitialObject);
XMultiServiceFactory xMSF = null;
if (rName != null)
{
System.err.println("got the remote naming service !");