OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

loading/saving remote documents

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
peter_saint
General User
General User


Joined: 14 Jun 2006
Posts: 12
Location: Bulgaria

PostPosted: Thu Oct 12, 2006 3:27 am    Post subject: loading/saving remote documents Reply with quote

Hello,

It seems I'm having some problems while loading files to OO server from a remote client.

The situation is that I have a machine [A] that runs the OO server, listening at some ip:port and I want my client machine [B] to connect to the OO server, pass a document for loading and storing.
e.g.
Code:

         rComponent = rComponentLoader->loadComponentFromURL(
            "file://machineB/sharedFolder/file.xls",
            OUString::createFromAscii("_blank" ),
            ...  );


Problem is that I sometimes I get "URL seems to be an unsupported one." exception, even though the share path is ok !

What could be the cause of this ? Is it possible that OO does not support loading files from shared path like file://computername/folder/file ?
Back to top
View user's profile Send private message
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Thu Oct 12, 2006 4:37 am    Post subject: Reply with quote

Mybe this threads should help :
connect to a server with username/password http://www.oooforum.org/forum/viewtopic.phtml?t=20759&highlight=
Client/server connection via basic macro http://www.oooforum.org/forum/viewtopic.phtml?t=19332&start=0&postdays=0&postorder=asc&highlight=
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
Olly600
General User
General User


Joined: 09 Oct 2006
Posts: 14

PostPosted: Thu Oct 12, 2006 6:50 am    Post subject: Reply with quote

I have to use something like "file:/// " to get my files to load. Check your URL loads normally on your pc and then it should load from a remote machine with no problems.
Back to top
View user's profile Send private message
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Thu Oct 12, 2006 12:19 pm    Post subject: Reply with quote

Quote:
"file:/// "

Are you sure for a remote file ?
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
peter_saint
General User
General User


Joined: 14 Jun 2006
Posts: 12
Location: Bulgaria

PostPosted: Thu Oct 12, 2006 12:34 pm    Post subject: Reply with quote

thanks for the links SergeM !

Olly600 wrote:
I have to use something like "file:/// " to get my files to load. Check your URL loads normally on your pc and then it should load from a remote machine with no problems.


seems like it wouldn't work at all if I use file:/// !
strange thing is that I couldn't figure when does this exception exactly occur, on some client-server environments I've tested, it does work as it is !

I havent tested it yet, but I am wondering would I achieve anything if I use the XSimpleFileAccess services, e.g.
Code:

 Reference <XInputStream > rInputFileStream ...

propsLoading[0].Name = OUString::createFromAscii("InputStream");
propsLoading[0].Value <<= rInputFileStream;

 rComponent = rComponentLoader->loadComponentFromURL(
                    OUString::createFromAscii("private:stream" ),
                    OUString::createFromAscii("_blank" ),
                    0,
          propsLoading );


I guess, nothing really changes in this case, am I correct !?
Back to top
View user's profile Send private message
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Fri Oct 13, 2006 8:28 am    Post subject: Reply with quote

I think, but i am not sure, that in the notation
Code:

file:///

the last / means the root of the local file system.
If you want a remote file use file://remoteMachine/....
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group