List Info

Thread: Propfind with dav client




Propfind with dav client
user name
2006-11-14 14:56:03
Hi Folks,

I'm new to the Slide DAV client, and I'm having a problem
which I'm 
unsure how to diagnose.  Using the code below I am doing a
PROPFIND 
request onto a DAV server, but the outgoing on-the-wire HTTP
packet does 
not contain the XML body content that I asked it to.  Have I
done 
something wrong here:

-------

// prepare the propfind message body, and the URL
String doc = "<some xml content>";
URL url = makeDAVURL();

// get me a new http client
HttpClient client = new HttpClient();
			
// set up the basic authentication
AuthScope as = new AuthScope(null, -1);
UsernamePasswordCredentials cred = new
	UsernamePasswordCredentials("username",
"password");
client.getState().setCredentials(as, cred);
		
PropFindMethod pf = new PropFindMethod(url);
pf.setRequestBody(doc);
pf.setDoAuthentication(true);
			
client.executeMethod(pf);
			
String response = pf.getResponseBodyAsString();

--------

If anyone has any thoughts on what might be the problem, I
would be very 
grateful.  Thanks for the DAV client - it is making my life
a whole lot 
easier this week!

All the best,

-- 
Richard
-------
Richard Jones
Web and Database Technology Specialist
Imperial College bond
t: +44 (0)20 759 48614 / +44 (0)20 759 41815
e: richard.d.jonesimperial.ac.uk

------------------------------------------------------------
---------
To unsubscribe, e-mail: slide-user-unsubscribejakarta.apache.org
For additional commands, e-mail: slide-user-helpjakarta.apache.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )