Hi,Juergen

>Juergen wrote:
>
>check it first in the office for example in Basic to see if it works in
>general
>o = createUnoService("com.sun.star.task.ProcessMSG")
>msgbox o.dbg_supportedInterfaces
>
>If this works you should check if your new type info is also available
>on the client side.

I check my component on localhost and the client side,and it works.
But I can not call the component through a socket connection.

My code is like this:

                        Reference< XComponentContext > rComponentContext =
                                defaultBootstrap_InitialComponentContext();

                        Reference< XMultiComponentFactory > rServiceManager = 
                                rComponentContext->getServiceManager();

                        Reference< XInterface > rInstance =
                                rServiceManager->createInstanceWithContext( 
                                        
OUString::createFromAscii("com.sun.star.bridge.UnoUrlResolver" ),
                                        rComponentContext );

                        Reference< XUnoUrlResolver > rResolver( rInstance, 
UNO_QUERY );

                        try
                        {
                                rInstance = rResolver->resolve( 
OUString::createFromAscii( 
                                        
"uno:socket,host=192.168.29.25,port=8100;urp;StarOffice.ServiceManager" ) );

                                Reference< XMultiServiceFactory > 
rOfficeServiceManager (rInstance, UNO_QUERY);

                                Reference< XPropertySet > xPropSet( rInstance, 
UNO_QUERY );
                                xPropSet->getPropertyValue( 
OUString::createFromAscii("DefaultContext") ) >>= rComponentContext;

                                Reference< XMultiComponentFactory > 
xMultiComponentFactoryServer(
                                        rComponentContext->getServiceManager() 
);

                                Reference < XSomething > xComponent(
                                        
xMultiComponentFactoryServer->createInstanceWithContext( 
                                                OUString( 
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.MyService2" ) ),
                                                rComponentContext ), UNO_QUERY 
);

                                xComponent->methodTwo();
                        }
                        .............

It didn't work.
It seems that the component didn't support to be called from a client side.
Are there some extra works needed?


Thanks
Best Regards


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to