Project: talendesb
Issue TESB-7280: ConsumerJob with tRESTClient can not read the response using Post method when deployed to Runtime
in studio,creat job with tRESTClient, for tRESTClient component,"Content Type" choose XML,"Accept Type" choose XML,please see the job in attachment. then deploy this job to Runtime,this job invokes the endpoint of CXF JaxRS provider using Post http method Provider can get the request,but on consumer side,can not read the response(the body of response is null),the exception log on consumer side are: {noformat} 22:14:21,539 | WARN | pool-13-thread-1 | rs.provider.AbstractJAXBProvider 609 | 129 - org.apache.cxf.cxf-rt-frontend-jaxrs - 2.7.0.SNAPSHOT | javax.xml.stream.XMLStreamException at org.codehaus.jettison.mapped.MappedXMLInputFactory.createXMLStreamReader(MappedXMLInputFactory.java:46) at org.codehaus.jettison.AbstractXMLInputFactory.createXMLStreamReader(AbstractXMLInputFactory.java:116) at org.codehaus.jettison.AbstractXMLInputFactory.createXMLStreamReader(AbstractXMLInputFactory.java:103) at org.apache.cxf.jaxrs.provider.json.utils.JSONUtils.createStreamReader(JSONUtils.java:151) at org.apache.cxf.jaxrs.provider.json.JSONProvider.createReader(JSONProvider.java:267) at org.apache.cxf.jaxrs.provider.json.JSONProvider.createReader(JSONProvider.java:257) at org.apache.cxf.jaxrs.provider.json.JSONProvider.readFrom(JSONProvider.java:209) at org.apache.cxf.jaxrs.provider.dom4j.DOM4JProvider.readFrom(DOM4JProvider.java:67) at org.apache.cxf.jaxrs.provider.dom4j.DOM4JProvider.readFrom(DOM4JProvider.java:38) at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1141) at org.apache.cxf.jaxrs.client.AbstractClient.readBody(AbstractClient.java:470) at org.apache.cxf.jaxrs.client.WebClient.handleResponse(WebClient.java:960) at org.apache.cxf.jaxrs.client.WebClient.doResponse(WebClient.java:944) at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:894) at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:761) at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:748) at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:355) at org.apache.cxf.jaxrs.client.WebClient.post(WebClient.java:381) at unifiedplatform_520.restfulcxfconsumerdopost_0_4.RestfulCXFConsumerDoPost.tFixedFlowInput_1Process(RestfulCXFConsumerDoPost.java:1479) at unifiedplatform_520.restfulcxfconsumerdopost_0_4.RestfulCXFConsumerDoPost.runJobInTOS(RestfulCXFConsumerDoPost.java:1989) at org.talend.esb.job.controller.internal.SimpleJobTask$JobRunner.run(SimpleJobTask.java:80) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at org.talend.esb.job.controller.internal.SimpleJobTask.run(SimpleJobTask.java:62) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) 16:32:40,890 | ERROR | ool-14-thread-11 | .cxf.jaxrs.client.AbstractClient 661 | 129 - org.apache.cxf.cxf-rt-frontend-jaxrs - 2.7.0.SNAPSHOT | .Problem with reading the response message, class : interface org.dom4j.Document, ContentType : */*. {noformat} when "Accept Type " choose any,there is no this problem. for Put method,although "Accept Type " choose xml,also has no this problem.similar consumer job except choosing put method and same REST service. if nessary,provide our REST service.
Story points: 1