You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by di...@apache.org on 2001/08/26 20:27:35 UTC
cvs commit: jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods PropPatchMethod.java
dirkv 01/08/26 11:27:35
Modified: src/webdav/client/src/org/apache/webdav/lib/methods
PropPatchMethod.java
Log:
little xml optimization when using DAV: namespace
Revision Changes Path
1.19 +10 -4 jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/PropPatchMethod.java
Index: PropPatchMethod.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/PropPatchMethod.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- PropPatchMethod.java 2001/06/20 01:33:10 1.18
+++ PropPatchMethod.java 2001/08/26 18:27:35 1.19
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/PropPatchMethod.java,v 1.18 2001/06/20 01:33:10 remm Exp $
- * $Revision: 1.18 $
- * $Date: 2001/06/20 01:33:10 $
+ * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/PropPatchMethod.java,v 1.19 2001/08/26 18:27:35 dirkv Exp $
+ * $Revision: 1.19 $
+ * $Date: 2001/08/26 18:27:35 $
*
* ====================================================================
*
@@ -82,6 +82,7 @@
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
* @author <a href="mailto:bcholmes@interlog.com">B.C. Holmes</a>
* @author <a href="mailto:eurrow@sas.com">Robert Owen</a>
+ * @author Dirk Verbeeck
*/
public class PropPatchMethod
extends XMLResponseMethodBase {
@@ -246,8 +247,13 @@
printer.writeElement("D", null, "prop", XMLPrinter.OPENING);
while (toSetList.hasMoreElements()) {
Property current = (Property) toSetList.nextElement();
- printer.writeProperty(current.namespace, current.namespaceInfo,
+ if ("DAV:".equals(current.namespaceInfo)) {
+ printer.writeProperty("D", null, current.name, current.value);
+ }
+ else {
+ printer.writeProperty(current.namespace, current.namespaceInfo,
current.name, current.value);
+ }
}
printer.writeElement("D", null, "prop", XMLPrinter.CLOSING);
Problems with lock
Posted by Raj Kumar <ko...@intalio.com>.
hi,
I am getting the following error while running the command line example
Slide.java
[LOCALHOST] /slide/ $ ls
files actions users
[LOCALHOST] /slide/ $ cd files
[LOCALHOST] /slide/files/ $ search
Performing a search on the server side
Inside the generate method of the Search Method
[LOCALHOST] /slide/files/ $ lock test
Locking '/slide/files/test': Fatal Error:
org.apache.commons.httpclient.State
Command input: lock test
java.lang.ClassCastException: org.apache.commons.httpclient.State
at
org.apache.webdav.lib.WebdavResource.generateIfHeader(WebdavResource.java:60
6)
at
org.apache.webdav.lib.WebdavResource.lockMethod(WebdavResource.java:3236)
at
org.apache.webdav.lib.WebdavResource.lockMethod(WebdavResource.java:3214)
at org.apache.webdav.cmd.Slide.processCommands(Slide.java:1343)
at org.apache.webdav.cmd.Slide$1.run(Slide.java:218)
at java.lang.Thread.run(Unknown Source)
Please, email to slide-user@jakarta.apache.org
It looks like the problem is that HttpClient.getState() return an object of
the class State but it is being cast to
WebdavState in the WebdavResource class. Does any body have a fix for this.
thanks.
rajkumar
-----Original Message-----
From: dirkv@apache.org [mailto:dirkv@apache.org]
Sent: Sunday, August 26, 2001 11:28 AM
To: jakarta-slide-cvs@apache.org
Subject: cvs commit:
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods
PropPatchMethod.java
dirkv 01/08/26 11:27:35
Modified: src/webdav/client/src/org/apache/webdav/lib/methods
PropPatchMethod.java
Log:
little xml optimization when using DAV: namespace
Revision Changes Path
1.19 +10 -4
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/PropPatchM
ethod.java
Index: PropPatchMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/
PropPatchMethod.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- PropPatchMethod.java 2001/06/20 01:33:10 1.18
+++ PropPatchMethod.java 2001/08/26 18:27:35 1.19
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/
PropPatchMethod.java,v 1.18 2001/06/20 01:33:10 remm Exp $
- * $Revision: 1.18 $
- * $Date: 2001/06/20 01:33:10 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/
PropPatchMethod.java,v 1.19 2001/08/26 18:27:35 dirkv Exp $
+ * $Revision: 1.19 $
+ * $Date: 2001/08/26 18:27:35 $
*
* ====================================================================
*
@@ -82,6 +82,7 @@
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
* @author <a href="mailto:bcholmes@interlog.com">B.C. Holmes</a>
* @author <a href="mailto:eurrow@sas.com">Robert Owen</a>
+ * @author Dirk Verbeeck
*/
public class PropPatchMethod
extends XMLResponseMethodBase {
@@ -246,8 +247,13 @@
printer.writeElement("D", null, "prop", XMLPrinter.OPENING);
while (toSetList.hasMoreElements()) {
Property current = (Property) toSetList.nextElement();
- printer.writeProperty(current.namespace,
current.namespaceInfo,
+ if ("DAV:".equals(current.namespaceInfo)) {
+ printer.writeProperty("D", null, current.name,
current.value);
+ }
+ else {
+ printer.writeProperty(current.namespace,
current.namespaceInfo,
current.name, current.value);
+ }
}
printer.writeElement("D", null, "prop", XMLPrinter.CLOSING);