Hi all, With slide-webdavclient-1.0.16 we use url to login to MS Exchange server http://www.e2kowa.ku.edu:80/exchange/test4fun and the path of SearchMethod is "/exchange/test4fun/calendar/" It works OK.
Our Exchange change to use HTTPS so we must use slide-webdavclient-20rc1 but when use url https://www.e2kowa.ku.edu:80/exchange/test4fun connected OK and path path of SearchMethod is "/exchange/test4fun/calendar/" it is error QNAME exception. And we change path of SearchMethod to "/calendar/" the response data is null. How the correct path is? Thanks and Good time, Victor Truong P/S Here is previous my email post to slide mail list: Hi Ingo, Thanks for your reply. I already re-compile our code but we face with the same problem. I already get recompile jakarta-slide-webdavclient-bin-2.0rc1 and change a little bit our code org.apache.commons.httpclient.HttpsURL url = new org.apache.commons.httpclient.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(); But the program throw the same exception in previous email. ........... [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) ............ Please help us. Thanks & Good time, Victor PS here is the xml query has passed through SearchMethod by above Query.searchCalRequest(from,to,path)); <?xml version="1.0"?><DAV:searchrequest xmlns:EXCHANGE="http://schemas.microsoft.com/exchange" xmlns:CALENDAR="urn:schemas:calendar:" xmlns:DAV="DAV:"><DAV:sql>SELECT "DAV:contentclass", "DAV:displayname", "urn:schemas:httpmail:fromname", "urn:schemas:mailheader:to", "urn:schemas:mailheader:from", "urn:schemas:mailheader:cc", "urn:schemas:mailheader:bcc", "urn:schemas:httpmail:subject", "urn:schemas:httpmail:datereceived", "urn:schemas:httpmail:textdescription", "urn:schemas:httpmail:priority", "http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/0x8102", "http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/0x8104", "http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/0x8105", "http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/0x810f", "urn:schemas:calendar:busystatus", "urn:schemas:calendar:dtstart", "urn:schemas:calendar:dtend", "urn:schemas:calendar:duration", "urn:schemas:calendar:alldayevent", "urn:schemas:calendar:recurrenceid", "urn:schemas:calendar:recurrenceidrange", "urn:schemas:calendar:rrule", "urn:schemas:calendar:exdate", "urn:schemas:calendar:exrule", "urn:schemas:calendar:uid", "urn:schemas:calendar:created", "urn:schemas:calendar:lastmodified", "urn:schemas:calendar:organizer", "EXCHANGE:category", "http://schemas.microsoft.com/exchange/category", "urn:schemas:calendar:location" FROM SCOPE('shallow traversal of "/exchange/test4fun/calendar/"') WHERE ("DAV:ishidden" = false) AND ("http://schemas.microsoft.com/exchange/outlookmessageclass" = 'IPM.Appointment') AND ("DAV:contentclass" = 'urn:content-classes:appointment') AND NOT ("urn:schemas:calendar:instancetype" = 1) AND ("urn:schemas:calendar:dtstart" > CAST("2004-03-31T22:00:00.000Z" as 'dateTime')) AND ("urn:schemas:calendar:dtend" < CAST("2004-05-01T02:00:00.000Z" as 'dateTime')) ORDER BY "urn:schemas:calendar:dtstart" ASC</DAV:sql></DAV:searchrequest> ----- Original Message ----- From: "Ingo Brunberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 07, 2004 7:57 AM Subject: Re: Problem use slide 2.0 beta connect to MS Exchange server through https > I did not receive the original e-mail, but anyway... > > Have you tried to recompile your code against 2.0b1? I guess you have > not, else you would have noticed that the API has changed a bit. > > Ingo > > > 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] > > >
