Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
hvanderborg
Contributor III
Contributor III

'Exception' with message 'Content type "application/xml" is

Hi,
I'm trying to send data to a webservice, as input I simply first tested with some fixed values:
tFixedFlowInput -> tXMLMap -> tRESTClient
as response I get this error:
<?xml version="1.0" encoding="UTF-8"?>
<result>
<error><!]></error>
<error_description><![CDATA[exception 'Exception' with message 'Content type "application/xml" is not supported. Accepted content types are "text/xml" and "application/json"' in....

How should I send my data as Content type 'text/xml' or as 'application/json'
I'm new with this, but was guessing I'd either need something like tJSONMap (which might not exist) or somehow keep using xml but then send as text/xml, but don't know how to.
Anybody willing to help out?

PS: in case relevant how I mapped so far: Currently in tXMLMap I added the field 'body' (document type) and mapped the necessary fields, and added a field 'string' but did nothing with that one (if field 'string' is absent Talend returned an error that the field did not exist)
Labels (5)
3 Replies
hvanderborg
Contributor III
Contributor III
Author

In this case I think it was solved by manually setting the header "Content-Type" to "text/xml". I thought I already checked that so possibly there was more to it. In any case this seems resolved
Anonymous
Not applicable

Hi,
I think it would be great if you create a JIRA request for feature. Your solution is fine but it would be better if the possibility to set the content type is a functionality of the component GUI. Taleld should extend its component this way.
Best regards
hvanderborg
Contributor III
Contributor III
Author

Hi,
Alright, thanks for the comment, I agree and added the feature request in JIRA https://jira.talendforge.org/browse/TDI-27121
Hope I specified all correctly (this was my first)
Best regards,