Sorry, I have no idea why this happens. Anyway, i usually put a tcp monitor utility between my client and the server while doing tests. This makes it possible to look at the requests and the answer, and can help to make it clear when there are client implementation or usage errors.

org.apache.axis.utils.tcpmon is a simple utility, included in the axis package from apache, with a nice swing gui, which is perfect for this work since has been designed to test webservices with axis. Just run it, add a new listener listening on, say, port 8081 and redirecting to the real port, say 8080, of your dav server. Then point the client to http://localhost:8081/slide/ instead of the real server, and you have complete dumps of requests and server answers in tcpmon. You can also look at how many connection you are generating while using your own apps and can switch to xmlview to have the XML parts correctly indented (well, this works sometimes ... :D)

Using tcpmon maybe you'll be able to understand what's goin on with your Slide.

Ciao,
Simone Gianni


At 23.51 22/05/2004, you wrote:
Hi Simone,

Thank you for your codes. I will try it.

Do you happen to know why the group-member-set value can't be displayed
directly from Webdav client on command line? As I mentioned, it returns a
long string full of space and carriage return. The initial installation
(2.0) will show that this string is about 110bytes long. And this is same
for either "root" or "john". Weird to me.

Thanks,
-Alan

----- Original Message -----
From: "Simone Gianni" <[EMAIL PROTECTED]>
To: "Slide Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, May 21, 2004 8:38 PM
Subject: Re: How to get group-member-set property?


> Hi Alan, > this is a snippet : > > // Retrieve the current property value > Vector props = new Vector(); > props.add(new PropertyName("DAV:", "group-member-set")); > Enumeration enu = resource.propfindMethod(DepthSupport.DEPTH_0, > props); > if (!enu.hasMoreElements()) return false; > ResponseEntity ent = (ResponseEntity) enu.nextElement(); > enu = ent.getProperties(); > if (!enu.hasMoreElements()) return false; > Property property = (Property) enu.nextElement(); > > // Cast it to JDOM, it's a waste i know, if you want you can do it > in DOM directly, with something like > //org.w3c.dom.Element propele = property.getElement(); > //org.w3c.dom.Element nele = > propele.getOwnerDocument().createElementNS("DAV:", "href:"); > //nele.setNodeValue("/users/username"); > //propele.appendChild(nele); > DOMBuilder builder = new DOMBuilder(true); > Element ele = builder.build(property.getElement()); > > // Now add the new user > Element nele = new Element("href", "DAV:"); > nele.addContent("/users/" + siteText.getText() + "-" + > userText.getText()); > ele.addContent(nele); > > // Convert the JDOM tree to a string and patch the property > XMLOutputter xout = new XMLOutputter(""); > xout.setTextNormalize(true); > String newattvalue = xout.outputString(ele.getContent()); > resource.proppatchMethod(new PropertyName(ele.getNamespaceURI(), ele > .getName()), newattvalue, true); > > This code is the result of a cut and paste from my own code, where i have > it splitted in different methods (that's why there are conversions from DOM > to JDOM and so on). It can be optimized not moving from DOM to JDOM and so > on, and maybe in other different ways. Anyhow, it works perfectly for me, > and adding a user to a role/group rarely is a bottleneck in performances. I > REPEAT, i made a cut and paste from various methods in my code to this > mail, so i could have done some errors ... > > Regarding the permissions to use it, obviously the user with which you log > on must have the right permission to issue a proppatch. Currently i'm > using root just to make sure it works. > > Let us know. > > Ciao, > Simone Gianni > > At 04.25 22/05/2004, you wrote: > >Hi, > > > >I am trying to add a new user to roles/user group-member-set. According to > >the documentation > > > > --------------------------------------------------------------------- > 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]



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



Reply via email to