Problem: Unexpected EOF in prolog

One Star

Problem: Unexpected EOF in prolog

Hi all!
I'm new to Talend, so my question may be too newbieish, but I read trough all documentation I found, including DGs, AGs, this forum and Google, but still can't solve my problem.
I'm trying to create service (svc1) which will call another service (svc2) upon request and return response. I created it in Open Studio as you may see at screenshot. It seems to be almost working Smiley Happy The only problem I have so far is I got this error in return:
Server|Could not generate the XML stream caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at : .||||
The same exception is found in log:
15:15:23,214 | WARN | qtp1962516546-65 | ache.cxf.common.logging.LogUtils 443 | 121 - org.apache.cxf.cxf-api - 2.7.5 | Interceptor for {http://core.company.local/}ChatService#{http://core.company.local/}GetChat has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not generate the XML stream caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at : .
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:73)
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:50)
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:46)
at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:123)

Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at :
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:677)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2139)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2045)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1134)
at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:693)
at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:652)
at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:606)
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:70)
... 48 more
I used Wireshark to sniff traffic and I see how svc1 get request, send request to svc2 and get response. So, problem happened somewhere after receiving response from svc2. Next step should be just send data from svc2 response in response of svc1. However, for some reason exception is thrown.
I have no idea why this happened and where should I look for problem.
Can anybody help?
Thanks in advance!
One Star

Re: Problem: Unexpected EOF in prolog

I resolved this issue by recreating job with use of tREST instead of tRESTClient. But the reason why I had no success with tRESTClient is still not clear for me.
One Star

Re: Problem: Unexpected EOF in prolog

I resolved that issue by renaming my document to "payload". It seems that tESBProviderResponse depends on the name payload. If you choose to name your document more descriptively, you're gonna have a hard time.
Talend sucks, let's face it. I could code all the Talend stuff 10x faster in Java and just drop it into a container.