eclipse-ee4j / metro-jax-ws

metro-jax-ws
https://eclipse-ee4j.github.io/metro-jax-ws/
BSD 3-Clause "New" or "Revised" License
72 stars 40 forks source link

XmlDataContentHandler should accept mime-types case-insensitiv #564

Open Tomas-Kraus opened 2 years ago

Tomas-Kraus commented 2 years ago

We are using JASWX-RT in our Webapplication. If we receive a email with the content-type "application/XML" (XML upper case) an exception is thrown by com.sun.xml.ws.encoding.XmlDataContentHandler:

java.io.IOException: Cannot convert DataSource with content type "application/XML" to object in XmlDataContentHandler
    at com.sun.xml.ws.encoding.XmlDataContentHandler.getContent(XmlDataContentHandler.java:100)
    at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:795)
    at javax.activation.DataHandler.getContent(DataHandler.java:542)
    at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1420)

The content-check should be change to accept also this mime-types.

Affected Versions

[2.2.10]

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