Hi Everyone

I'm new to the list and new to jakarta slide and I have a problem. I
wrote a small and simple webdav client in Java with the jakarta slide
libraries. I want open a session to a Windows Sharepoint Workspace,
upload only one file and close the session. Here is my code (I deleted
the values, of course there is something in there):

[Code]
String hostUrl = "";
String userName = "";
String password = "";
String hostAdd = "";
String domain = "";

NTCredentials creds = new NTCredentials(userName, password, hostAdd,
domain);
HttpURL host = new HttpURL(hostUrl);
WebdavResource wdr = new WebdavResource(host, (NTCredentials)creds,
WebdavResource.DEFAULT, DepthSupport.DEPTH_1);

File fn = new File("remote-e.txt");
wdr.putMethod(fn);
wdr.close();
[/Code]
 
When I use the getMethod(); instead ... everything is working so only
putting the file is a problem and gives me this error:
 
[Error]
org.apache.commons.httpclient.HttpException: Unbuffered entity enclosing
request can not be repeated.
at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequest
Body(EntityEnclosingMethod.java:436)
at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase
.java:2290)
at
org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBa
se.java:2625)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java
:1061)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:6
43)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:4
97)
at
org.apache.webdav.lib.WebdavResource.putMethod(WebdavResource.java:2792)
at
org.apache.webdav.lib.WebdavResource.putMethod(WebdavResource.java:2762)
at ch.manor.SlideTest.main(SlideTest.java:45)
[/Error]
 
Can anyone help me out? I don't know how to debug this.

Many thanks in advance!
 
regards
Matthias


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to