OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Empty/null response from netty4-http template producer


Hello,

I have put a simple project that demonstrates this problem.  This does not appear to be related to stream caching, as I have enable stream caching in both Camel contexts.

https://github.com/lexsoto/camel-karaf-netty-producer-test/tree/master <https://github.com/lexsoto/camel-karaf-netty-producer-test/tree/master>

Can anybody take a look and let me know what I am doing wrong?

Thanks and best regards,
Alex soto



> On Feb 22, 2018, at 5:42 PM, Alex Soto <alex.soto@xxxxxxxxxxx> wrote:
> 
> Hello,
> 
> I am having some problems migrating to Camel 2.20.2 from 2.17.4.    This has been working before, but now the response is null.
> I have access to the server logs and everything there looks good, i.e., the server is sending a response, but client is unable to get it.
> Here is the client code:
> 
> 		SimpleRegistry registry = new SimpleRegistry();
> 		registry.put("sslParams", sslContextParams);
> 
> 		DefaultCamelContext defaultCamelContext = new DefaultCamelContext(registry);
> 		defaultCamelContext.addComponent("netty4-http", new NettyHttpComponent());
> 		defaultCamelContext.setTracing(true);
> 		defaultCamelContext.setName("itest");
> 		defaultCamelContext.setStreamCaching(true);
> 		defaultCamelContext.start();
> 
> 		ProducerTemplate producerTemplate = defaultCamelContext.createProducerTemplate();
> 		producerTemplate.start();
> 
> 		final BytesAndDecParams requestMessage = makeEnrolCertRequest();
> 
> 		byte[] response = producerTemplate.requestBody(
> 				"netty4-http:https://localhost:8895/service?sslContextParameters=#sslParams&ssl=true <https://localhost:8895/service?sslContextParameters=#sslParams&ssl=true>",
> 				requestMessage.message,
> 				byte[].class);
> 
> 		assertNotNull(response);
> 
> 
> I appreciate any help with this problem.
> Best regards,
> Alex soto
> 
>