Hello Stephan

I have implemented  Mathias's suggestion, and as long as i did :
args[ 1 ].Name = "Interactionhandler";
nothing happened
now that i am doing
args[ 1 ].Name = "InteractionHandler";
well, still nothing happens however, the client is still waiting for the
return of the method call
Object o  =  officeComponentLoader.loadComponentFromURL(url, "_blank",
0, args);

however , on the server side (where openoffice is running) , oo stopped
responding,
nothing pops up and it seems to die, the only way to stop it is via the
task manager.

David D

Stephan Bergmann wrote:

> David Dankwerth wrote:
>
>> Stephan
>>
>> Many thanks, that was the problem , now the InteractionHanlder loads
>> fine
>> and I managed to go ahead with the loadComponenet
>> However , I am not sure what can i do with the interaction handler, all
>> examples i managed
>> to find show the sdb interaction handler.
>> Should i construct a XInteractionRequest ?
>
>
> Erm, you should pass the interaction handler instance back into the
> loadComponent call, as Mathias sketched below (not sure whether the
> property name "Interactionhandler" is upper-/lowercase correct,
> however).  The idea was that if loadComponent ran into some problem,
> it might consult the interaction handler, which in turn should pop up
> an error box, which might give you a clue what goes wrong.  If that
> does not happen, one of the "might"s or "should"s failed, and this
> route of debugging the problem would have turned out to be fruitless...
>
> -Stephan
>
>> Thanks
>> David D
>>
>> Stephan Bergmann wrote:
>>
>>
>>> David Dankwerth wrote:
>>>
>>>
>>>> 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 ?
>>>
>>>
>>>
>>> You probably try to instantiate the InteractionHandler service at your
>>> local Java component context/service manager.  Try the remote one,
>>> obtained from soffice, instead.
>>>
>>> -Stephan
>>>
>>>
>>>> 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
>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


________________________________________________________________________
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