From 866ac09a0b6415aa37739c8ecb1d62031e4ed6f7 Mon Sep 17 00:00:00 2001 From: mguessan Date: Tue, 20 Jul 2010 13:30:39 +0000 Subject: [PATCH] EWS: use UTF-8 to decode request on error git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1226 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/ews/EWSMethod.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/java/davmail/exchange/ews/EWSMethod.java b/src/java/davmail/exchange/ews/EWSMethod.java index adf230be..1d7f5544 100644 --- a/src/java/davmail/exchange/ews/EWSMethod.java +++ b/src/java/davmail/exchange/ews/EWSMethod.java @@ -510,7 +510,11 @@ public abstract class EWSMethod extends PostMethod { */ public void checkSuccess() throws EWSException { if (errorDetail != null) { - throw new EWSException(errorDetail + "\n request: " + new String(generateSoapEnvelope())); + try { + throw new EWSException(errorDetail + "\n request: " + new String(generateSoapEnvelope(), "UTF-8")); + } catch (UnsupportedEncodingException e) { + throw new EWSException(e.getMessage()); + } } }