Can't create / update task with HTML content

7 visningar
Hoppa till det första olästa meddelandet

sysmo...@gmail.com

oläst,
1 juni 2017 11:24:582017-06-01
till jec users, noe.b...@sysmosoft.com
Hello,

We have some issues with tasks that have been created from a client (e.g Outlook) with HTML content.

These tasks can be retrieved in our app, but then it's not possible to update any field of the task (status, subject, dueDate, ...). 

The following code reproduce the issue : 

// Retrieve a task with HTML content created from Outlook

EWSTaskDTO ewsHtmlTask = connector.getFullTask(idVersion[0]);

ewsHtmlTask.setSubject("Edited subject");

                                 
// Fail

connector.updateTask(ewsHtmlTask);


It's also impossible to create a task with HTML content :
EWSTaskDTO ewsTask = new EWSTaskDTO();
ewsTask
.setSubject("Test");
ewsTask
.setBody("<html>my body</html>");

// Fail
String[] idVersion = connector.createTask(ewsTask);



Both issues produce the following error : 

jec.ExchangeGeneralException: <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorSchemaValidation</faultcode><faultstring xml:lang="en-US">The request failed schema validation: The element 'http://schemas.microsoft.com/exchange/services/2006/types:Body' cannot contain child element 'http://schemas.microsoft.com/exchange/services/2006/messages:html' because the parent element's content model is text only.</faultstring><detail><e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorSchemaValidation</e:ResponseCode><e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The request failed schema validation.</e:Message><t:MessageXml xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><t:LineNumber>1</t:LineNumber><t:LinePosition>614</t:LinePosition><t:Violation>The element 'http://schemas.microsoft.com/exchange/services/2006/types:Body' cannot contain child element 'http://schemas.microsoft.com/exchange/services/2006/messages:html' because the parent element's content model is text only.</t:Violation></t:MessageXml></detail></s:Fault></s:Body></s:Envelope>

If the second issue is not important yet (it's possible to force our text editor to plain text for a first version), the first one is more critical : tasks created in HTML cannot be completed or modified in our apps.

Thank you,

Noé

jonathan sanders

oläst,
2 juni 2017 03:17:072017-06-02
till jec users2, noe.b...@sysmosoft.com
Hi,
EWS support only text body for Tasks, so, no HTML option here.

--
You received this message because you are subscribed to the Google Groups "jec users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jec-users2+unsubscribe@googlegroups.com.
To post to this group, send email to jec-u...@googlegroups.com.
Visit this group at https://groups.google.com/group/jec-users2.
For more options, visit https://groups.google.com/d/optout.



--
Best Regards,
Jonathan Sanders,
Developer & Support Eng,
NetComps LTD
Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden