daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Dec 10th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. restConfiguration().host("localhost").component("undertow").bindingMode(RestBindingMode.off);
  2.     rest("/endpoint?{1param}&{2param}")
  3.     .get("/")
  4.         .route().routeId("Ednpoint1")
  5.             .autoStartup(true)
  6.             .setProperty("uri", simple("http4://0.0.0.0:8080/endpoint?1param=${header.1param}&2param=${header.2param}"))
  7.             .setHeader(Exchange.HTTP_METHOD, constant("GET"))
  8.             .removeHeaders("CamelHttp*")
  9.        .toD("${header.uri}").endRest().responseMessage().message("${body}");
  10.    
  11. restConfiguration().host("localhost").component("undertow").bindingMode(RestBindingMode.off);
  12.         rest("/endpoint?{param1}&{param2}")
  13.         .get("/")
  14.             .route().routeId("Endpoint2")
  15.                 .autoStartup(true)
  16.                 .setProperty("uri", simple("http4://endpoint-destionation/service?dhi=${header.param1}&dhf=${header.param2}"))
  17.                 .setHeader(Exchange.HTTP_METHOD, constant("GET"))
  18.                 .removeHeaders("*")
  19.            .toD("${header.uri}").endRest().responseMessage().message("${body}");
  20.    
  21. org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 146541; received: 54482
  22. at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:180)
  23. at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:137)
  24. at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:150)
  25. at org.apache.camel.util.IOHelper.copy(IOHelper.java:219)
  26. at org.apache.camel.util.IOHelper.copy(IOHelper.java:174)
  27. at org.apache.camel.util.IOHelper.copy(IOHelper.java:170)
  28. at org.apache.camel.component.http4.HttpProducer.doExtractResponseBodyAsStream(HttpProducer.java:414)
  29. at org.apache.camel.component.http4.HttpProducer.extractResponseBody(HttpProducer.java:397)
  30. at org.apache.camel.component.http4.HttpProducer.populateResponse(HttpProducer.java:242)
  31. at org.apache.camel.component.http4.HttpProducer.process(HttpProducer.java:203)
  32. at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
  33. at org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:178)
  34. at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:445)
  35. at org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:160)
  36. at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
  37. at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
  38. at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
  39. at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
  40. at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
  41. at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97)
  42. at org.apache.camel.component.undertow.UndertowConsumer.handleRequest(UndertowConsumer.java:126)
  43. at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
  44. at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
  45. at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
  46. at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
  47. at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
  48. at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
  49. at java.lang.Thread.run(Thread.java:748)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top