Hi Amr,
IMO your are trying to change the property of any file, which is set in 'homeUrl', but 
not '/testFile'. Did you've tried to use proppatchMethod() with a total path of the 
requested file?

        WebdavResource.proppatchMethod(String path, 
                                                 PropertyName propertyName, 
                                     String propertyValue, 
                                               boolean action);

Regards,
Thomas

-----Urspr�ngliche Nachricht-----
Von: Amr Elssamadisy [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 28. April 2004 16:33
An: slide mailing list
Betreff: adding properties to files

Hi - I noticed a recent message above asking about the same thing (but using the 
client) and I don't know if it has been resolved.  Basically - I'm not able to add 
properties to a file.  The code below returns "Not Implemented(501)"...  Any ideas?

    public void testWebdavReadWriteProperties() throws Exception{
        homeUrl.setUserinfo("test","test");
        WebdavResource res = new WebdavResource(homeUrl);
        assertTrue(res.exists());
        try{
            //write file
            boolean success = res.putMethod("/testFile","");
            assertTrue(res.getStatusMessage(),success);//write an empty 
file       
           
            //add property
            success = res.proppatchMethod("prop1", "val1", true);
            assertTrue(res.getStatusMessage(),success);//write prop 1    
   
        }
        finally{
            res.deleteMethod("");       
        }
       
    }

Thanks!  Amr

--
Amr Elssamadisy

Developer,Researcher,Student
(In no particular order...)

tel: (413) 207-1225
email: [EMAIL PROTECTED]



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



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

Reply via email to