Re: Need help
Attila, (probably this is the wrong forum for Exchange-related questions anyway, so my apologies to the other people for answering this briefly...) please consult Microsoft's documentation... from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/ wss/_webdav_errors_5_6.asp The server does not support the functionality that is required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource... The reason for that might either be your code or the version of Exchange you are using (always remember that you need at least Exchange 2000 SP 1 for WebDAV to work _and_ Outlook Web Access (OWA) needs to be turned on). This is just a pointer, MS has pretty good newsgroups for that sort of questions. Also check out the VB and C# sample code on their website, it translates quite easily to Java / Slide if you read the Javadocs as well. Just a pointer, HTH. Ralph Am 15.04.2005 um 17:48 schrieb Kovari Attila: Hello, I am developing an application that uses your Slide's WEBDAV library to connect to an exchange server. My problem is that it works for an exchange server but on an other i get the 501 Status when i try to connect. Anybody knoes what could be the reason for this? Thank, Attila Kovari - 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]
Help, please: PropPatchMethod.addPropertyToSet
Hi everybody, I am successfully using SLIDE client with Exchange Server 2003 for querying (thanks for the great job btw!). However, now I am trying to modify data via PropPatchMethod. My first attempt was using WebdavResource.proppatchmethod which worked but I need to execute a PropPatchMethod only because WebdavResource does a PROPFIND after the PROPPATCH (which fails when Exchange changes the target file name). When I build my Hashtable for resource.proppatchMethod(Hashtable xy, boolean x), I do something like this: props.put(new PropertyName(urn:schemas:calendar:, location), appt.location()); which works successfully. However, when I construct the PropPatchMethod by hand using public void addPropertyToSet(java.lang.String name, java.lang.String value, java.lang.String namespace, java.lang.String namespaceInfo) I do not know what to write into the namespace and namespace info fields because I have no clue what namespace abbreviation and namespace info should be... I have tried something like this: ppm.addPropertyToSet(location, appt.location(), dummy, urn:schemas:calendar:); where I have used dummy to provide an arbitrary string or to get some kind of useful error but it doesn't seem so... Can anybody tell me which parameters I have to pass to this method to make it work correctly? Thanks a lot for your help. Ralph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help, please: PropPatchMethod.addPropertyToSet
Sorry, don't bother. It works now - I just found out that public void addPropertyToSet(java.lang.String name, java.lang.String value, java.lang.String namespace, java.lang.String namespaceInfo) accepts null for the namespace String and the real namespace is in namespaceInfo. Ralph Scheuer Am 25.02.2005 um 16:05 schrieb Ralph Scheuer: Hi everybody, I am successfully using SLIDE client with Exchange Server 2003 for querying (thanks for the great job btw!). However, now I am trying to modify data via PropPatchMethod. My first attempt was using WebdavResource.proppatchmethod which worked but I need to execute a PropPatchMethod only because WebdavResource does a PROPFIND after the PROPPATCH (which fails when Exchange changes the target file name). When I build my Hashtable for resource.proppatchMethod(Hashtable xy, boolean x), I do something like this: props.put(new PropertyName(urn:schemas:calendar:, location), appt.location()); which works successfully. However, when I construct the PropPatchMethod by hand using public void addPropertyToSet(java.lang.String name, java.lang.String value, java.lang.String namespace, java.lang.String namespaceInfo) I do not know what to write into the namespace and namespace info fields because I have no clue what namespace abbreviation and namespace info should be... I have tried something like this: ppm.addPropertyToSet(location, appt.location(), dummy, urn:schemas:calendar:); where I have used dummy to provide an arbitrary string or to get some kind of useful error but it doesn't seem so... Can anybody tell me which parameters I have to pass to this method to make it work correctly? Thanks a lot for your help. Ralph - 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]
Help, please: Exchange SearchMethod problem
Hello, I am currently starting out with the Slide Client and I tried to query an Exchange 2000 Server. While my propfind code works well, I did not manage to master the SearchMethod that I have to used for SQL-based queries. In the list archives, I found some code similar to my snippet below. However, when I execute this SearchMethod, I get the following error message via System.out: [Fatal Error] strict.dtd:81:5: The declaration for the entity ContentType must end with ''. Can anybody tell me how to avoid this error or take a peek at my code what I am doing wrong? Thanks for helping. Ralph Scheuer PS: In the Exchange URL, please don't bother with the Posteingang folder, this is just the name of the inbox folder in the German Exchange version. This is perfectly okay and the folder is visible via Exchange Explorer. HttpClient client = new HttpClient(); try{ client.startSession(some-exchangeserver.de, 80, new UsernamePasswordCredentials(myusername, mypassword)); StringBuffer qu = new StringBuffer(); qu.append(?xml version =\1.0\?); qu.append(d:searchrequest xmlns:d=\DAV:\); qu.append(d:sql); qu.append(SELECT \DAV:id\, ); qu.append(\urn:schemas:httpmail:subject\, ); qu.append(\urn:schemas:httpmail:from\, ); qu.append(\urn:schemas:httpmail:displayto\, ); qu.append(\urn:schemas:httpmail:textdescription\ ); qu.append(FROM SCOPE('shallow traversal of ); qu.append(\ + http://some-exchangeserver.de/exchange/username/Posteingang; + \')); qu.append(/d:sql); qu.append(/searchrequest); System.out.println(qu.toString()); SearchMethod sm = new SearchMethod(/exchange/e110904313/, qu.toString()); client.executeMethod(sm); Enumeration enum = sm.getAllResponseURLs(); while(enum.hasMoreElements()){ NSLog.out.appendln(enum.nextElement()); } [continued...] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help, please: Exchange SearchMethod problem
Hello again, Am 15.10.2004 um 19:09 schrieb Ralph Scheuer: [cry for help] qu.append(/searchrequest); Sorry for that, it was my fault in the code... should have been qu.append(/d:searchrequest) The strange error message distracted me from the actual glitch. Nothing to see here, just a crying newbie ;-) Ralph Scheuer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MSPowerPointExtractor problem
Ryan, thanks for your reply. I have also seen the posts from Sudhakar on this subject who seems to be contributing a whole lot of code here - which is a great thing but in this code the problem also persists so I think we solve this encoding problem in your code (which is simpler - the fix could later be integrated into Sudhakar's code if this is checked in or whatever...). I have tested this with a simple PPT file containing just the following text: Umlaut-Test Ökologie, Mühsal, Größe, Grätsche I get the following console output with this text: Umlaut-Test \326kologie, M\374hsal, Gr\374\337e, Gr\344tsche Here is the output I get in a web browser (through a web app, view HTML source mode): Umlaut-Test ÷kologie, M¸hsal, Gr¸?e, Gr?tsche German umlaute and other special characters work fine that way whenever I extract text from Word documents or Excel spreadsheets using POI and Ryan Ackley's TextMining framework. just for the record: I have only tested this on my own configuration: Mac OS X 10.3.4, Java 1.4.2_03 so I have no idea how these classes might behave on Linux or Windows. Can anybody confirm this? I have seen some German names on this list ;-) Thanks for all the work you put into this. Ralph Scheuer Am 01.08.2004 um 08:07 schrieb Ryan Rhodes: Hi Ralph, I haven't tested the PPT extractor with any other languages. I remember reading about other people having problems with different character sets though. Could you send a before and after example file here or to bugzilla? -Ryan Rhodes -Original Message- From: Ralph Scheuer [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 28, 2004 10:01 AM To: slide Subject: MSPowerPointExtractor problem Hello everybody, When I was searching for a Java class to extract text from PowerPoint files, I accidentally discovered Slide. I pulled the MSPowerPointExtractor class and some other stuff it depends on via CVS and tried it for some text extraction. The method I used looks very similar to the provided example main method (see below). However. when I tried to extract text from a German PowerPoint presentation, I had some problems with the encoding. I did not know which encoding to use, converting the output to ISO Latin 1 with my text editor solved only part of the problem (some German Umlaute were displayed correctly, some were not). Is this a known issue or am I doing something wrong? Any hints for me? Thanks in advance. Ralph Scheuer BTW. I am using Mac OS X 10.3.4 with JDK 1.4.2_03, the native encoding on this platform is MacRoman. public static String contentStringForData(NSData data){ StringBuffer buf = new StringBuffer(); try{ ByteArrayInputStream input = data.stream(); MSPowerPointExtractor ex = new MSPowerPointExtractor(null, null); Reader reader = ex.extract(input); int c; do { c = reader.read(); buf.append((char)c); } while( c != -1 ); }catch(Exception e){ } return buf.toString(); } - 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]
[Solved]: MSPowerPointExtractor problem
Hi everybody, just a quick note for everybody: Meanwhile, I managed to solve the problem. Ryan's and Sudhakar's sources work flawlessly (at least with German special characters) after adding one additional method to the source (see below). The extracted String needs to be interpreted with Cp1252 encoding. It may well be that this is a Mac-specific encoding problem - I cannot verify the Windows or Linux behavior here. Anyway, the following code solved the problem for me. Again, thanks for all the great work you have done. Ralph Scheuer private static String convertEncoding(String incoming){ String outgoing = null; try { outgoing = new String(incoming.getBytes(), Cp1252); } catch (Exception e) { SDLogger.catchException(e); } return outgoing; } PS: If there are no objections, I would like to contact the POI developer team and file a bug in bugzilla as I have the feeling that the code both of you have provided would be ideally suited for integrating some variant of it into the POI framework. Kind regards. Ralph Am 02.08.2004 um 13:13 schrieb Koundinya ((Sudhakar Chavali)): Hm, Basically we have concentrated on English language. So we never faced any problems. It become a new task for our team now :-) Thanks to Ralph in pointing that problem. We Will work on related and let the Jakarta team knows :-) Regards Sudhakar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
MSPowerPointExtractor problem
Hello everybody, When I was searching for a Java class to extract text from PowerPoint files, I accidentally discovered Slide. I pulled the MSPowerPointExtractor class and some other stuff it depends on via CVS and tried it for some text extraction. The method I used looks very similar to the provided example main method (see below). However. when I tried to extract text from a German PowerPoint presentation, I had some problems with the encoding. I did not know which encoding to use, converting the output to ISO Latin 1 with my text editor solved only part of the problem (some German Umlaute were displayed correctly, some were not). Is this a known issue or am I doing something wrong? Any hints for me? Thanks in advance. Ralph Scheuer BTW. I am using Mac OS X 10.3.4 with JDK 1.4.2_03, the native encoding on this platform is MacRoman. public static String contentStringForData(NSData data){ StringBuffer buf = new StringBuffer(); try{ ByteArrayInputStream input = data.stream(); MSPowerPointExtractor ex = new MSPowerPointExtractor(null, null); Reader reader = ex.extract(input); int c; do { c = reader.read(); buf.append((char)c); } while( c != -1 ); }catch(Exception e){ } return buf.toString(); }