Hi Zahra,
You only need 
https://jackrabbit.apache.org/jcr/components/jackrabbit-webdav-library.html 
which is available from 
https://github.com/apache/jackrabbit/tree/trunk/jackrabbit-webdav.
It is a small layer on top of Apache HttpComponents HttpClient 4.5 
(https://hc.apache.org/httpcomponents-client-4.5.x/index.html) and provides 
WebDAV methods in 
https://github.com/apache/jackrabbit/tree/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/client/methods.
To establish a connection just use the approach outlined at 
https://github.com/apache/httpcomponents-client/blob/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientWithResponseHandler.java
 but instead of HttpGet use one of the method classes mentioned above.
Hope this helps,
Konrad



> On 6. Oct 2022, at 14:52, Zahra Ayed <zahra.a...@progineer.net> wrote:
> 
> Hello 
> i want to ask if i can use Jackrabbit on client side using Java Maven to 
> communicate with an Apache server (Apache Module mod_dav) 
> 
> If so, what are the components needed for this and if you can provide me with 
> a simple code that does the trick I would be very grateful.
> I tried to establish a connection using this code :
> 1.  Repository repository = JcrUtils.getRepository("my url");
> 
> 2.  Session session = repository.login(
> 
> 3.  new SimpleCredentials("my username", "my Password".toCharArray()));
> 
>  
>  but i get this Error :
> Login failed: Unknown workspace 'null'.: javax.jcr.LoginException: Login 
> failed: Unknown workspace 'null'.
> What should I do?
> Zahra Abu Zahra                
> Software Developer    
>    
>  
> CGC Building,7th Floor,Al Bireh,Ramallah
> 

Reply via email to