jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akshat Saxena" <Akshat.Sax...@infogain.com>
Subject Issue in checkout the document!!
Date Wed, 25 Feb 2009 11:43:34 GMT
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

 


Mime
View raw message