Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
SebastianK
Contributor
Contributor

Handling of malformed response header in tRestClient component

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 ("=").

0693p00000BWsPAAA1.png

Malformed header in response. The content-types charset is separated by a colon and space (": ").

0693p00000BWsQ8AAL.png

Labels (3)
0 Replies