Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.8
-
None
-
None
-
Operating System: other
Platform: Other
-
29524
Description
Hi,
I was trying to write an document to an eXist database using the
WritingSourceTransformer when I figure out that the user and password
defined in cocoon.xconf at:
<component-instance
class="org.apache.cocoon.components.source.impl.XMLDBSourceFactory"
name="xmldb">
<driver class="org.exist.xmldb.DatabaseImpl" type="exist" user="user"
password="password"/>
</component-instance>
were not used.
the XML used to store the document is like :
<source:write create="true">
<source:source>xmldb:exist://localhost:8080/exist/xmlrpc/db/test.xml</source:source>
<source:fragment>
<mydoc>pim pam pom</mydoc>
</source:fragment>
</source:write>
The XMLDBSourceFactory get user and password from cocoon.xconf and use them to
create an XMLDBSource but two methods of this class doesn't handle credentials
when accessing database : writeOutputStream() and delete().
the call to :
DatabaseManager.getCollection(base);
is used instead of :
DatabaseManager.getCollection(base, user, password) ;
I was trying to write an document to an eXist database using the
WritingSourceTransformer when I figure out that the user and password
defined in cocoon.xconf at:
<component-instance
class="org.apache.cocoon.components.source.impl.XMLDBSourceFactory"
name="xmldb">
<driver class="org.exist.xmldb.DatabaseImpl" type="exist" user="user"
password="password"/>
</component-instance>
were not used.
the XML used to store the document is like :
<source:write create="true">
<source:source>xmldb:exist://localhost:8080/exist/xmlrpc/db/test.xml</source:source>
<source:fragment>
<mydoc>pim pam pom</mydoc>
</source:fragment>
</source:write>
The XMLDBSourceFactory get user and password from cocoon.xconf and use them to
create an XMLDBSource but two methods of this class doesn't handle credentials
when accessing database : writeOutputStream() and delete().
the call to :
DatabaseManager.getCollection(base);
is used instead of :
DatabaseManager.getCollection(base, user, password) ;