Open files from exist-database via API
Posted: Wed Jan 08, 2014 6:27 pm
Hi.
I try to open an xml-file from an exist database via the oXygen-API, not by webDAV, but by the common xmldb/xmlrpc protocol. I created an exist - Data Source ("eXist-Test") and Data Connections, one with the regular exist drivers ("eXist-Test-Connection") and one with the webDAV FTP source. Both work fine and I can browse my database in the Data Source Explorer with both, the exist-xmlrpc-connection and the webDAV-connection.
I am also able to access the files via API by webDAV:
Oxygen then asks for the user name and password.
But I'd rather like to open the file via the xmlrpc/xmldb connection.
None of the following paths are working:
However, what does work is the usage of the pre-defined connection:
But I am really uncomfortable with having to store the user name and password in plain in the oxygen setting. It's unsecure and it's complicated for the users of my framework to change the user account. So I would really prefer it to work like with webDAV, so that oxygen asks for the user data, when the file is accessed.
Can someone tell me, what the right syntax has to be to open a exist-file by the API via xmlrpc without this wierd predefined connection in the oxygen settings?
Thanks,
Thomas.
I try to open an xml-file from an exist database via the oXygen-API, not by webDAV, but by the common xmldb/xmlrpc protocol. I created an exist - Data Source ("eXist-Test") and Data Connections, one with the regular exist drivers ("eXist-Test-Connection") and one with the webDAV FTP source. Both work fine and I can browse my database in the Data Source Explorer with both, the exist-xmlrpc-connection and the webDAV-connection.
I am also able to access the files via API by webDAV:
Code: Select all
String file = xmldb:exist://localhost:8080/exist/webdav/db/dwdsdb/src/E_m_1829.xml;
authorAccess.getWorkspaceAccess().open(new URL(file));
But I'd rather like to open the file via the xmlrpc/xmldb connection.
None of the following paths are working:
Code: Select all
file = http://localhost:8080/exist/xmlrpc/db/dwdsdb/src/E_m_1829.xml;
file = xmldb:exist://localhost:8080/exist/xmlrpc/db/dwdsdb/src/E_m_1829.xml;
file = oxygen:xmldb:exist://localhost:8080/exist/xmlrpc/db/dwdsdb/src/E_m_1829.xml;
Code: Select all
file = oxygen:$eXist-Test/eXist-Test-Connection/db/dwdsdb/src/E_m_1829.xml;
Can someone tell me, what the right syntax has to be to open a exist-file by the API via xmlrpc without this wierd predefined connection in the oxygen settings?
Thanks,
Thomas.