Hello Mathias

Sorry it took me so long to come back to you,
I have now incorporated your suggestion into my code
however i get
"[java] Exception in thread "main" com.sun.star.uno.Exception: Query for
service factory for com.sun.star.loader.SharedLibrary failed."
before the program attempts to load , do i need to setup something in
order to be able to use the InteractionHandler ?

Thanks
David D


Mathias Bauer wrote:

>David Dankwerth wrote:
>  
>
>>Hi
>>
>>The attached sample java program does the following:
>>
>>1. Connect to a remote open office
>>2. Ask open office to loadComponentFromURL using tomcat and webdav
>>3. Ask open office to storeToURL using the writer_export_PDF filter,
>>saving the doc
>>    back to tomcat with the original name and add a ".pdf"
>>4. release the connection to the remote open office.
>>
>>The program works fine when Open office is running on a remote linux
>>server (gentoo used emerge openoffice-1.9.109.ebuild)
>>However, when openoffice runs on a windows machine (server 2003) the
>>loadComponent returns null.
>>
>>The openoffice on the windows machine does manage to open the url when i
>>am using the GUI interface of openoffice.
>>
>>Anything i need to enable in openoffice to make this work ?
>>    
>>
>
>You could add a InteractionHandler to your loadComponentFromURL call.
>This might show you an error message that can point to the problem.
>
>And BTW: the parameter name "read-only" is wrong.
>Code (not tested) shown below:
>
>  
>
>>com.sun.star.beans.PropertyValue [] args = new 
>>com.sun.star.beans.PropertyValue [2];
>>
>>args[ 0 ] = new PropertyValue();
>>args[ 0 ].Name = "ReadOnly";
>>args[ 0 ].Value = new Boolean(true);
>>
>>args[ 1 ] = new PropertyValue();
>>args[ 1 ].Name = "Interactionhandler";
>>
>>Object oHandler = xRemoteServiceManager.createInstanceWithContext(
>>       "com.sun.star.task.InteractionHandler", xOfficeComponentContext );
>>
>>args[ 1 ].Value = (com.sun.star.task.XInteractionHandler)
>>  UnoRuntime.queryInterface( com.sun.star.task.XInteractionHandler.class, 
>> oHandler );
>>    
>>
>
>Best regards,
>Mathias
>
>  
>


________________________________________________________________________
This e-mail and its attachments are confidential. If you are not the intended 
recipient of this e-mail message, please telephone or e-mail us immediately, 
delete this message from your system and do not read, copy, distribute, 
disclose or otherwise use this e-mail message and any attachments. 

Although ri3k believes this e-mail and any attachments to be free of any virus 
or other defect which may affect your computer, it is the responsibility of the 
recipient to ensure that it is virus free and ri3k does not accept any 
responsibility for any loss or damage in any way from its use.

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

Reply via email to