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

Six Stars

'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)
Six Stars

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

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
Seventeen Stars

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

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
Six Stars

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

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,

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads