Can't POST an XML file to a Route

Highlighted
One Star

Can't POST an XML file to a Route

Hello everyone, I'm REALLY new to the Talend world, and I'm starting my adventure from Talend ESB.
What I need to do: I need to expose a REST service that can receive an XML file and will redirect it to a Talend Job for some Business Logic.
What I've Tried: Here I show you my Jobs and Route.
Job n°1 - The REST Client sending the XML file
This client takes an XML file from the file system, map it into the body (document) and sends it through the POST method called "sendViaggio"
http://postimg.org/image/idtnibcph/
Route - The REST service that routes the XML file to the Job n°2
]http://postimg.org/image/gjgt0kpp1/
Job n°2 - The one who do some business logic
]http://postimg.org/image/wvquqb40l/

My problem: The client doesn't sand anything to the Route, or actually, it sends something with an empty body.
Here you can see the error on the Job n°1:
500|No message body writer has been found for response class MessageContentsList.

Here you can see the WARN on the Route:
: org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor - No message body writer has been found for response class MessageContentsList.
What am I doing wrong?
Ten Stars

Re: Can't POST an XML file to a Route

This is happening because you are not using a tRouteOutput in your Job no.2. The cCXFRS expects to return a XML/JSON document, but as the cTalendJob is not sending anything back, there is nothing to return. Hence the message. If you add a tRouteOutput and configure it's "body" response to be a XML document, this will work.
One Star

Re: Can't POST an XML file to a Route

Thank you, this solution worked Smiley Wink

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read