Hi,

I'have the same problem with Catacomb when I try to get the result of the REPORT method. I'm using jakarta-slide-webdavlib-2.0rc1.jar.


ReportMethod method = new ReportMethod(httpUrl.getEscapedPath(), depth, properties.elements()); resource.getSessionInstance(httpUrl).executeMethod(method);



I have sniffed the TCP traffic with netTool : --> request :

REPORT /repos/file.xml HTTP/1.1
Content-Type: text/xml; charset=utf-8
User-Agent: Jakarta Commons-HttpClient/2.0final
Host: localhost:7000
Content-Length: 121
Depth: 1

<?xml version="1.0" encoding="utf-8" ?>
<D:version-tree xmlns:D="DAV:">
<D:prop>
<D:version-name/>
</D:prop>
</D:version-tree>


--> Response :
------ start dump -----
HTTP/1.1 200 OK
Date: Wed, 07 Apr 2004 13:21:04 GMT
Server: Apache/2.0.46 (Unix) mod_ssl/2.0.46 OpenSSL/0.9.6b DAV/2 Catacomb/0.9.0
Transfer-Encoding: chunked
Content-Type: text/xml; charset="utf-8"


146
<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/repos/file.xml/!/2/!/file.xml</D:href>
<D:propstat><D:prop>
<D:version-name>V2</D:version-name>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>

[...]
11
</D:multistatus>

0
----- end dump -----

According to the http traffic, the response is ok, but the ReportMethod dosen't seem to think like me :-\

method.getStatusCode() : 200
method.getResponseHeaders() : same data as above.
method.getResponses() : empty
method.getResponseBodyAsString() : null


is there something I have missed ? Thanks in advance.

Best regards,
Gildas



Truong Nguyen Ngoc wrote:

Hi,

In 2003, we develop application use webdavlib in Slide 1.0.16 client to
access Calendar of MS Exchange server 2000 SP2 by http protocol. It works
ok.

Now we change to use HTTPS protocol but Slide 1.0.16 not support and can not
login to Exchange through Https. So I change to use Slide 2.0 beta webdavlib
client but have exception

org.apache.util.HttpsURL url = new
org.apache.util.HttpsURL(protocol+"://"+host+":"+port);
 url.setUserInfo(user,password);
url.setPath(expath+"/"+user);
 WebdavResource rc = new WebdavResource(url);
String path = "/"+expath+"/"+(String)principal.get("user")+"/calendar/";
SearchMethod src = new SearchMethod(path,
Query.searchCalRequest(from,to,path));
 rc.executeHttpRequestMethod(rc.retrieveSessionInstance(), src);
Enumeration e = src.getResponses();

Here is exception:

[Fatal Error] :1:979: Element or attribute do not match QName production:
QName:
:=(NCName':')?NCName.
java.lang.NullPointerException
        at
org.apache.webdav.lib.methods.XMLResponseMethodBase.initResponseHasht
able(XMLResponseMethodBase.java:350)
        at
org.apache.webdav.lib.methods.XMLResponseMethodBase.getResponseHashta
ble(XMLResponseMethodBase.java:336)
        at
org.apache.webdav.lib.methods.XMLResponseMethodBase.getResponses(XMLR
esponseMethodBase.java:173)

What something wrong in our code? please help me. With them same code work
ok with http protocol and Slide 1.0.16

I do more thing debug result as follow:

debug("rc.getStatusMessage() " +  rc.getStatusMessage());  -> OK 200
debug("rc.getStatusCode() "+rc.getStatusCode());                ->200
debug("src.getResponseBodyAsString()"+ src.getResponseBodyAsString()); ->
null
debug(new String(src.getResponseBody())); -> null
debug(src.getResponseHeaders());  -> have data
debug(src.getResponseBodyAsStream());   -> null
debug(src.getResponseDocument());   -> null


Thank,


Victor


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



Reply via email to