-
Feature
-
Resolution: Obsolete
-
Minor
-
None
-
0
-
0%
-
Todo
(Migrated from https://github.com/syndesisio/syndesis/issues/3118)
Currently when using integration [something] -> http invoke, you can't specify content type for the request in the UI. It would be nice if the user could specify the content type of the request, because otherwise (when using endpoint that consumes something else than text/plain) it will fail with this exception:
``
org.apache.camel.http.common.HttpOperationFailedException: HTTP operation failed invoking http://http-svc:8080/ with statusCode: 415 at org.apache.camel.component.http4.HttpProducer.populateHttpOperationFailedException(HttpProducer.java:312) ~[camel-http4-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.component.http4.HttpProducer.process(HttpProducer.java:207) ~[camel-http4-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) ~[camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at io.syndesis.integration.component.proxy.ComponentProxyProducer.process(ComponentProxyProducer.java:44) ~[integration-component-proxy-1.4-SNAPSHOT.jar!/:1.4-SNAPSHOT] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) ~[camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:110) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:110) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at io.syndesis.integration.runtime.logging.ActivityTrackingInterceptStrategy$EventProcessor.process(ActivityTrackingInterceptStrategy.java:79) [integration-runtime-1.4-SNAPSHOT.jar!/:1.4-SNAPSHOT] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:110) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.processor.Pipeline.process(Pipeline.java:80) [camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.component.sjms.consumer.InOnlyMessageHandler.handleMessage(InOnlyMessageHandler.java:65) [camel-sjms-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.component.sjms.consumer.AbstractMessageHandler.onMessage(AbstractMessageHandler.java:86) [camel-sjms-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1401) [activemq-client-5.14.5.jar!/:5.14.5] at org.apache.activemq.ActiveMQMessageConsumer.iterate(ActiveMQMessageConsumer.java:1572) [activemq-client-5.14.5.jar!/:5.14.5] at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:191) [activemq-client-5.14.5.jar!/:5.14.5] at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133) [activemq-client-5.14.5.jar!/:5.14.5] at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48) [activemq-client-5.14.5.jar!/:5.14.5] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151] {"exchange":"i-LHlQTtxpj46Maa39_fVz","step":"-LHlOMuoBcaeKn6_5OlQ","id":"i-LHlQTu2pj46Maa39_fXz","duration":58150695,"failure":"org.apache.camel.http.common.HttpOperationFailedException: HTTP operation failed invoking http://http-svc:8080/ with statusCode: 415\n\tat org.apache.camel.component.http4.HttpProducer.populateHttpOperationFailedException(HttpProducer.java:312)\n\tat org.apache.camel.component.http4.HttpProducer.process(HttpProducer.java:207)\n\tat org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)\n\tat org.apache.camel.processor.Pipeline.process(Pipeline.java:138)\n\tat org.apache.camel.processor.Pipeline.process(Pipeline.java:101)\n\tat io.syndesis.integration.component.proxy.ComponentProxyProducer.process(ComponentProxyProducer.java:44)\n\tat org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148)\n\tat org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:110)\n\tat org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)\n\tat org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)\n\tat org.apache.camel.processor.Pipeline.process(Pipeline.java:138)\n\tat org.apache.camel.processor.Pipeline.process(Pipeline.java:101)\n\tat org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:110)\n\tat io.syndesis.integration.runtime.logging.ActivityTrackingInterceptStrategy$EventProcessor.process(ActivityTrackingInterceptStrategy.java:79)\n\tat org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:110)\n\tat org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)\n\tat org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)\n\tat org.apache.camel.processor.Pipeline.process(Pipeline.java:138)\n\tat org.apache.camel.processor.Pipeline.process(Pipeline.java:101)\n\tat org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)\n\tat org.apache.camel.processor.Pipeline.process(Pipeline.java:138)\n\tat org.apache.camel.processor.Pipeline.process(Pipeline.java:101)\n\tat org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)\n\tat org.apache.camel.processor.Pipeline.process(Pipeline.java:80)\n\tat org.apache.camel.component.sjms.consumer.InOnlyMessageHandler.handleMessage(InOnlyMessageHandler.java:65)\n\tat org.apache.camel.component.sjms.consumer.AbstractMessageHandler.onMessage(AbstractMessageHandler.java:86)\n\tat org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1401)\n\tat org.apache.activemq.ActiveMQMessageConsumer.iterate(ActiveMQMessageConsumer.java:1572)\n\tat org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:191)\n\tat org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)\n\tat org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\n"} {"exchange":"i-LHlQTtxpj46Maa39_fVz","status":"done","failed":true} 2018-07-19 07:25:29.150 ERROR 1 --- [ Session Task-7] o.a.activemq.ActiveMQMessageConsumer : ID:i-test-3-76dtk-37599-1531984945934-1:1:1:1 Exception while processing message: ID:fakefrog-36741-1531985122320-1:1:1:1:1 org.apache.camel.RuntimeCamelException: java.lang.NullPointerException at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1830) ~[camel-core-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.camel.component.sjms.consumer.AbstractMessageHandler.onMessage(AbstractMessageHandler.java:113) ~[camel-sjms-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1401) [activemq-client-5.14.5.jar!/:5.14.5] at org.apache.activemq.ActiveMQMessageConsumer.iterate(ActiveMQMessageConsumer.java:1572) [activemq-client-5.14.5.jar!/:5.14.5] at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:191) [activemq-client-5.14.5.jar!/:5.14.5] at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133) [activemq-client-5.14.5.jar!/:5.14.5] at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48) [activemq-client-5.14.5.jar!/:5.14.5] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151] Caused by: java.lang.NullPointerException: null at org.apache.camel.component.sjms.consumer.AbstractMessageHandler.onMessage(AbstractMessageHandler.java:88) ~[camel-sjms-2.21.0.fuse-000094.jar!/:2.21.0.fuse-000094] ... 8 common frames omitted
``
My endpoint used "consumes=application/json", but the request was probably "text/plain"
This can probably be done using custom extension, but maybe it is worth to have it in the UI directly?