metro-jax-ws icon indicating copy to clipboard operation
metro-jax-ws copied to clipboard

XmlDataContentHandler is not compatible with JavaMail

Open Tomas-Kraus opened this issue 3 years ago • 0 comments

The MimeCodec class installs some JAF DataContentHandlers that override the default DataContentHandlers included with JavaMail. Unfortunately, the JAX-WS text/xml handler is not compatible with the JavaMail version.

First, the MIME type comparison is not case insensitive.

Second, it's returning a StreamSource as the preferred type from getContent instead of String.

Third, even if you ask for a String explicitly from getTransferData, it still returns a StreamSource.

The other DataContentHandlers should be checked for similar problems.

Affected Versions

[2.2.8]

Source: https://github.com/javaee/metro-jax-ws/issues/1133 Author: glassfishrobot

Tomas-Kraus avatar Jun 02 '22 17:06 Tomas-Kraus