jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Vaz de Melo Rodrigues <brunovazdem...@gmail.com>
Subject Re: Problem Retrieve a file with webdav
Date Mon, 16 Jan 2012 19:04:16 GMT
This thing don't throwns exception.... i change the PropFindMethod to
GetMethod and works. I don't know its the best thing but works.

Thanks.

Em Seg, 2012-01-16 às 18:58 +0000, Tobias Bocanegra escreveu:
> Hi,
> what's the exception that is thrown?
> 
> --
> toby
> 
> On Mon, Jan 16, 2012 at 3:38 AM, Bruno Vaz de Melo Rodrigues
> <brunovazdemelo@gmail.com> wrote:
> >
> > I put a file in jackrabbit workspace using webdav, but i can't retrieve
> > this file. I try this:
> > public byte[] readFile(WebDavServerConfig serverConfig, String path,
> > String fileName) throws BasicException {
> >        //String resource =
> >                "http://localhost:9080/jackrabbit-webapp-2.3.6/default/file.zip";
> >
> >        HttpClient client = getClient(serverConfig);
> >        PropFindMethod method = null;
> >        try {
> >                method = new PropFindMethod(resource);
> >                // Execute the method.
> >                int statusCode = client.executeMethod(method);
> >                // Read the response body.
> >                byte[] responseBody = method.getResponseBody();
> >
> >                return responseBody;
> >        } finally {
> >                // Release the connection.
> >                method.releaseConnection();
> >        }
> > }
> >
> > but when "method = new PropFindMethod(resource);" is executed my
> > aplication go to finally and don't put nothing in the log, what i need
> > to do to retrieve a file?
> >
> > Thanks,
> > Bruno Vaz de Melo
> >



Mime
View raw message