Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to call a webservice which responds with an invalid content-type header field. Please see examples below.
The tRestClient component processing fails because of the invalid content type header field.
Unfortunately I cannot change the webservice as it is controlled by another entity beyond my control.
Is there any chance to still process the response gracefully or any suitable workaround for the invalid header field?
Exception due to invalid media type parameter. (removed internal names)
Exception in component tRESTClient_1 (<removed>)
java.lang.IllegalArgumentException: Wrong media type parameter, separator is missing
at org.apache.cxf.jaxrs.impl.MediaTypeHeaderProvider.addParameter(MediaTypeHeaderProvider.java:122)
at org.apache.cxf.jaxrs.impl.MediaTypeHeaderProvider.internalValueOf(MediaTypeHeaderProvider.java:109)
at org.apache.cxf.jaxrs.impl.MediaTypeHeaderProvider.valueOf(MediaTypeHeaderProvider.java:66)
at org.apache.cxf.jaxrs.utils.JAXRSUtils.toMediaType(JAXRSUtils.java:1744)
at org.apache.cxf.jaxrs.impl.ResponseImpl.getMediaType(ResponseImpl.java:251)
at org.apache.cxf.jaxrs.impl.ResponseImpl.doReadEntity(ResponseImpl.java:334)
at org.apache.cxf.jaxrs.impl.ResponseImpl.readEntity(ResponseImpl.java:314)
at org.apache.cxf.jaxrs.impl.ResponseImpl.readEntity(ResponseImpl.java:304)
at <removed>.<removed>.<removed>.tWriteJSONField_1_InProcess(<removed>.java:20844)
at <removed>.<removed>.<removed>$1ThreadXMLField_tWriteJSONField_1_Out.run(<removed>.java:6169)
Normally expected header in response. The content-types charset is separated by an equals sign ("=").
Malformed header in response. The content-types charset is separated by a colon and space (": ").