Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- restConfiguration().host("localhost").component("undertow").bindingMode(RestBindingMode.off);
- rest("/endpoint?{1param}&{2param}")
- .get("/")
- .route().routeId("Ednpoint1")
- .autoStartup(true)
- .setProperty("uri", simple("http4://0.0.0.0:8080/endpoint?1param=${header.1param}&2param=${header.2param}"))
- .setHeader(Exchange.HTTP_METHOD, constant("GET"))
- .removeHeaders("CamelHttp*")
- .toD("${header.uri}").endRest().responseMessage().message("${body}");
- restConfiguration().host("localhost").component("undertow").bindingMode(RestBindingMode.off);
- rest("/endpoint?{param1}&{param2}")
- .get("/")
- .route().routeId("Endpoint2")
- .autoStartup(true)
- .setProperty("uri", simple("http4://endpoint-destionation/service?dhi=${header.param1}&dhf=${header.param2}"))
- .setHeader(Exchange.HTTP_METHOD, constant("GET"))
- .removeHeaders("*")
- .toD("${header.uri}").endRest().responseMessage().message("${body}");
- org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 146541; received: 54482
- at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:180)
- at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:137)
- at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:150)
- at org.apache.camel.util.IOHelper.copy(IOHelper.java:219)
- at org.apache.camel.util.IOHelper.copy(IOHelper.java:174)
- at org.apache.camel.util.IOHelper.copy(IOHelper.java:170)
- at org.apache.camel.component.http4.HttpProducer.doExtractResponseBodyAsStream(HttpProducer.java:414)
- at org.apache.camel.component.http4.HttpProducer.extractResponseBody(HttpProducer.java:397)
- at org.apache.camel.component.http4.HttpProducer.populateResponse(HttpProducer.java:242)
- at org.apache.camel.component.http4.HttpProducer.process(HttpProducer.java:203)
- at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
- at org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:178)
- at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:445)
- at org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:160)
- at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
- at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
- at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
- at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
- at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
- at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97)
- at org.apache.camel.component.undertow.UndertowConsumer.handleRequest(UndertowConsumer.java:126)
- at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
- at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
- at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
- at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
- at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
- at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
- at java.lang.Thread.run(Thread.java:748)
Add Comment
Please, Sign In to add comment