camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dharini <dharini.kandas...@polarisft.com>
Subject Restful webservice call
Date Tue, 12 Nov 2013 09:55:29 GMT
I am trying to invoke a restful webservice using camel. Below is my line of
code

Component component = new org.apache.camel.component.mina.MinaComponent();
			context.addComponent("tcp", component);
			
			Component component1 = new org.apache.camel.component.cxf.CxfComponent();
			context.addComponent("cxf", component1);
			try
			{
			context.addRoutes(new RouteBuilder() {
				public void configure() {
					from("mina:tcp://localhost:6789?textline=true&sync=true")
					
.to("cxfrs:http://localhost:1977/RESTfulWebserviceExample/rest/ConversionService/FeetToInch/2");
				}

						});
			}
			catch (Exception e)
			{
				e.printStackTrace();
			}
			context.start();
			Thread.sleep(10000000);
			context.stop();
			
I am getting below exception
15:21:01.253 [Camel (camel-1) thread #5 - MinaThreadPool] ERROR
o.a.c.processor.DefaultErrorHandler - Failed delivery for (MessageId:
ID-N6359-52056-1384249748841-0-3 on ExchangeId:
ID-N6359-52056-1384249748841-0-4). Exhausted after delivery attempt: 1
caught: java.lang.NullPointerException
java.lang.NullPointerException: null
	at
org.apache.camel.component.cxf.jaxrs.CxfRsProducer.populateCxfRsProducerException(CxfRsProducer.java:302)
~[camel-cxf-2.10.4.jar:2.10.4]

Please suggest me where I need to correct.



--
View this message in context: http://camel.465427.n5.nabble.com/Restful-webservice-call-tp5743082.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message