You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by James Higginbotham <jh...@betweenmarkets.com> on 2003/05/09 21:32:35 UTC
Help with WebdavResource.propfindMethod()
I'm hoping someone can give me a quick snippet to show how to process
the returned Enumeration from a propfindMethod() using the Webdav client
API. The javadoc isn't clear on how to process the results using the
API. I am using the findPropMethod( 0 ) on a collection and want to get
the list of property names and values from the result.
Thanks,
James
Re: Help with WebdavResource.propfindMethod()
Posted by Martin Dulisch <md...@s-und-n.de>.
Hi James,
there are different results returned by the propfingMethod.
Depending which signature of the method you use. The enumeration
can contain ResponseEntity objects or Property objects.
Have a look at the source of WebDavResource.
Martin
James Higginbotham wrote:
> I'm hoping someone can give me a quick snippet to show how to
> process the returned Enumeration from a propfindMethod() using
> the Webdav client API. The javadoc isn't clear on how to
> process the results using the API. I am using the
> findPropMethod( 0 ) on a collection and want to get the list
> of property names and values from the result.
>
> Thanks,
> James
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Help with WebdavResource.propfindMethod()
Posted by Kevin Moran <gr...@yahoo.com>.
Hi James,
You might want to have a look at the source for
the Webdav command-line utility. Specifically, take a
look at propfindall() in org.apache.webdav.cmd.Client.
I think it will show you how to handle the
Enumeration.
HTH,
-kevin
--- James Higginbotham
<jh...@betweenmarkets.com> wrote:
> I'm hoping someone can give me a quick snippet to
> show how to process
> the returned Enumeration from a propfindMethod()
> using the Webdav client
> API. The javadoc isn't clear on how to process the
> results using the
> API. I am using the findPropMethod( 0 ) on a
> collection and want to get
> the list of property names and values from the
> result.
>
> Thanks,
> James
>
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Help with WebdavResource.propfindMethod()
Posted by Andreas Probst <an...@gmx.net>.
Hi James,
I'm not sure whether this works properly, as this test code
snippet is almost a year old and I didn't use it in production.
Enumeration responses = webdavResource.propfindMethod(path,
DepthSupport.DEPTH_0);
ResponseEntity response = (ResponseEntity) responses.nextElement();
Enumeration properties = response.getProperties();
while (properties.hasMoreElements())
{
org.apache.webdav.lib.Property property =
(Property)properties.nextElement();
property.getName()
property.getPropertyAsString()
}//while
See org.apache.webdav.lib.PropertyName for properties with a
different namespace than DAV.
Regards.
Andreas
On 9 May 2003 at 14:32, James Higginbotham wrote:
> I'm hoping someone can give me a quick snippet to show how to process
> the returned Enumeration from a propfindMethod() using the Webdav client
> API. The javadoc isn't clear on how to process the results using the
> API. I am using the findPropMethod( 0 ) on a collection and want to get
> the list of property names and values from the result.
>
> Thanks,
> James
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org