Newbie: How to debug lockMethod failure

Ian Pilcher <[email protected]> Sat, 04 Aug 2007 13:13:00 -0500
Newsgroups gmane.comp.jakarta.slide.user
Message-ID <[email protected]>
How can I determine why my call to lockMethod is failing?  I am
connecting to a local Apache server, with mod_dav.  (Locking works fine
with cadaver, BTW.)

Here is the code I'm using right now:

    import org.apache.webdav.lib.WebdavResource;
    import org.apache.commons.httpclient.HttpURL;

    class DavLock
    {
        public static void main(String[] args) throws Exception
        {
            WebdavResource resource = new WebdavResource(
                    new HttpURL("http://localhost/dav/ipilcher.ics"),
                    true);

            if (!resource.lockMethod())
            {
                System.out.println("lock failed!");
                return;
            }

            //  Other stuff snipped; it never gets here
        }
    }

Any pointers appreciated.  Thanks!

-- 
========================================================================
Ian Pilcher                                         [email protected]
========================================================================