You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Hamid Reza Sahlolbey <sa...@gmail.com> on 2008/01/17 14:30:12 UTC

Re: Webdav Client Examples?



Angela Schreiber <anchela <at> day.com> writes:

> 
> Jukka Zitting wrote:
> > Hi,
> > 
> > On Nov 14, 2007 11:26 AM, ossi petz <ossipetz <at> hallo.ms> wrote:
> >> Has anyone made some examples on how to use HttpClient with the
> >> Jackrabbit Webdav Client?
> 
> there is an example in the sandbox/spi/spi2dav project.
> 
> > Not really. The WebDAV support in Jackrabbit is more focused on
> > server-side implementations than clients.
> 
> > The best there is for clients is a collection of WebDAV method classes
> > in the jackrabbit-webdav component.
> 
> ... which are only waiting for somebody having time to put them
> together to a complete dav client :).
> 
> regards
> angela
> 
> 
Hi;
Can you please refer to a link that I can access "sandbox/spi/spi2dav project"
I couldn't find it by googling.

Cheers,
Hamid




Re: Webdav Client Examples?

Posted by florinmarcus <fl...@gebs.ro>.
Hello again,
I have test it and is working, 
Thanks Julian,

Florin


Julian Reschke wrote:
> 
> florinmarcus wrote:
>> ...
>> What I still don't manage to do is to create a new folder using the same
>> API.
>> Can sombody give me a hint?
>> ...
> 
> Did you already look at MkColMethod?
> 
> Best regards, Julian
> 
> 



-- 
View this message in context: http://www.nabble.com/Webdav-Client-Examples--tp13743139p22205163.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Webdav Client Examples?

Posted by florinmarcus <fl...@gebs.ro>.
Hello Julien,
I will do that right away,

Thanks a lot,

Florin


Julian Reschke wrote:
> 
> florinmarcus wrote:
>> ...
>> What I still don't manage to do is to create a new folder using the same
>> API.
>> Can sombody give me a hint?
>> ...
> 
> Did you already look at MkColMethod?
> 
> Best regards, Julian
> 
> 

-- 
View this message in context: http://www.nabble.com/Webdav-Client-Examples--tp13743139p22202758.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Webdav Client Examples?

Posted by Julian Reschke <ju...@gmx.de>.
florinmarcus wrote:
> ...
> What I still don't manage to do is to create a new folder using the same
> API.
> Can sombody give me a hint?
> ...

Did you already look at MkColMethod?

Best regards, Julian

Re: Problem with Date Comparisons

Posted by Alexander Klimetschek <ak...@day.com>.
On Wed, Feb 25, 2009 at 2:59 PM, Kurz Wolfgang <wo...@gwvs.de> wrote:
> I always get a full result-set when I use <= xs:dateTime or < and I always get a empty resultset when ever is use >= or >
>
> Somehow it doesn't matter at all what the value I compare to is.
>
> This is the query I am using:
> /jcr:root/*/*/*[(@artikelDokument = 'false') and (@freigegeben = 'true') and (@aktiv = 'true') and (@wiedervorlageAsDate <= xs:dateTime('2008-02-25T14:18:26.516+01:00'))and (@tempContent = 'false')]/*//element(*, nt:unstructured) [(@menuid = '1067') and  ( @ocm_classname='de.gwvs.tos.commons.jackrabbit.domain.JCRMenuId')]
>
> Anyone have an idea on what I am doing wrong?

No idea yet. Did you check the field is actually stored as DATE
property? What values are stored in those dates (it could be that they
actually are all before the date given in your query....)?

When you mention "<=", "<", ">=" and ">", do you mean you always used
the xs:dateTime() function for the comparison?

You have to use that function for comparing to dates and it must
always include the full ISO8601 string (date + "T" + time +
"Z"/offset), but your query above looks good in this respect.

Reards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Problem with Date Comparisons

Posted by Kurz Wolfgang <wo...@gwvs.de>.
Hello everyone, 

I am having trouble searching for Content before or after a certain date in my Repository.

I have a attribute in my repository that's called "wiedervorlageAsDate" which is a Calendar Type.

Now when I do a Search on my Repository like the following:

I always get a full result-set when I use <= xs:dateTime or < and I always get a empty resultset when ever is use >= or > 

Somehow it doesn't matter at all what the value I compare to is.

This is the query I am using:
/jcr:root/*/*/*[(@artikelDokument = 'false') and (@freigegeben = 'true') and (@aktiv = 'true') and (@wiedervorlageAsDate <= xs:dateTime('2008-02-25T14:18:26.516+01:00'))and (@tempContent = 'false')]/*//element(*, nt:unstructured) [(@menuid = '1067') and  ( @ocm_classname='de.gwvs.tos.commons.jackrabbit.domain.JCRMenuId')]

Anyone have an idea on what I am doing wrong?

There has to be a solution cause I can't imagine any use of jackrabbit if you can't compare dates that are stored inside.

Would be awesome if anyone had some hints for me!

Thx a lot in advance!

Wolfgang

Re: Webdav Client Examples?

Posted by florinmarcus <fl...@gebs.ro>.
Hello,

I have managed to create a new Document inside webdav using jackrabbit
webdav client:
[code]

            HostConfiguration hostConfig = new HostConfiguration();
            hostConfig.setHost("localhost", 8082); 
            //hostConfig.
            HttpConnectionManager connectionManager = new
MultiThreadedHttpConnectionManager();
            HttpConnectionManagerParams params = new
HttpConnectionManagerParams();
            int maxHostConnections = 20;
            params.setMaxConnectionsPerHost(hostConfig, maxHostConnections);
            connectionManager.setParams(params);    
            HttpClient client = new HttpClient(connectionManager);
            Credentials creds = new UsernamePasswordCredentials("scanner1",
"scanner1");
            client.getState().setCredentials(AuthScope.ANY, creds);
            client.setHostConfiguration(hostConfig);
            return client;




            PutMethod pm = new
PutMethod("http://localhost:8082/webdav/scanner1_queque/uploader/image_" + i
+ ".txt");
            String text = "this is the document content";
            pm.setRequestBody(text);
            httpClient.executeMethod(pm);

[/code]



What I still don't manage to do is to create a new folder using the same
API.
Can sombody give me a hint?

Thanks,
Florin 

-- 
View this message in context: http://www.nabble.com/Webdav-Client-Examples--tp13743139p22202452.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Webdav Client Examples?

Posted by Angela Schreiber <an...@day.com>.
hi hamid

Hamid Reza Sahlolbey wrote:
> Can you please refer to a link that I can access "sandbox/spi/spi2dav project"
> I couldn't find it by googling.

here
http://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/spi2dav

please be aware that the code there is not intended to be
an end-user dav client. but you can get an idea how
to make usage of dav-method-extensions in conjunction with
apache-httpclient.

regards
angela