You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Akshat Saxena <Ak...@infogain.com> on 2009/02/25 12:43:34 UTC

Issue in checkout the document!!

Hi,

 

I am using Sharepoint 2007 and I want to checkout & checkin the document
through java program. I tried using JackRabbit Web Dav but its not
working fine. 

Though it shows the status as 200 & OK but nothing happens at sharepoint
end. Their version remains the same & the document content also remains
same.

Below is the code I am using:

 

************************************************************************
************************************************************************
******************************

public void updateDocument(HttpClient client, String resourcePath, File
file){

CheckoutMethod checkoutMethod = new CheckoutMethod(resourcePath + "/" +
file.getName());

      client.executeMethod(checkoutMethod);

 

      PutMethod putMethod = new PutMethod(resourcePath + "/" +
file.getName());

      RequestEntity requestEntity = new InputStreamRequestEntity(new
FileInputStream(file));

      putMethod.setRequestEntity(requestEntity);

          

      client.executeMethod(putMethod);

      System.out.println(putMethod.getStatusCode() + " "+
putMethod.getStatusText());

 

}

************************************************************************
************************************************************************
*********************************

Regards,

Akshat

 


Re: Issue in checkout the document!!

Posted by Alexander Klimetschek <ak...@day.com>.
On Wed, Feb 25, 2009 at 12:43 PM, Akshat Saxena
<Ak...@infogain.com> wrote:
> I am using Sharepoint 2007 and I want to checkout & checkin the document
> through java program. I tried using JackRabbit Web Dav but its not working
> fine.
>
> Though it shows the status as 200 & OK but nothing happens at sharepoint
> end. Their version remains the same & the document content also remains
> same.

Could you explain how you connected Jackrabbit and Sharepoint? Where
does the webdav come into play? Also, without any error messages,
stack traces, http dumps, etc., it is pure guessing anyway.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com