camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "anish.somadevan" <netan...@gmail.com>
Subject Re: Camel Restlet
Date Sun, 02 Aug 2015 08:33:29 GMT
This is the error message i get

04:25:01,428 INFO  [callRestAPI] (Camel (camelAgent) thread #2 -
JmsConsumer[ISEEOutboundQueue]) Routing to RestAPI
04:25:01,430 INFO  [callRestAPI] (Camel (camelAgent) thread #2 -
JmsConsumer[ISEEOutboundQueue]) Headers set in Javascript
{Authorization=MyToken,
Content-Type=application/atom+xml;type=entry;charset=utf-8}
04:25:01,861 ERROR [org.apache.camel.processor.DefaultErrorHandler]
(Restlet-910628961) Failed delivery for exchangeId:  Exhausted after
delivery attempt: 1 caught:
org.apache.camel.component.restlet.RestletOperationException: Restlet
operation failed invoking http://MyRESTAPI/public/messages with statusCode:
401 /n responseBody:<Error><Code>401</Code><Detail>MissingToken: The
authorization header was not found.
TrackingId:da04b482-9d16-4d71-8899-17c0df90d273_G22,TimeStamp:8/2/2015
8:25:02 AM</Detail></Error>:
org.apache.camel.component.restlet.RestletOperationException: Restlet
operation failed invoking http://MyRESTAPI/public/messages with statusCode:
401 /n responseBody:<Error><Code>401</Code><Detail>MissingToken: The
authorization header was not found.
TrackingId:da04b482-9d16-4d71-8899-17c0df90d273_G22,TimeStamp:8/2/2015
8:25:02 AM</Detail></Error>
	at
org.apache.camel.component.restlet.RestletProducer.populateRestletProducerException(RestletProducer.java:193)
[camel-restlet-2.10.3.jar:2.10.3]
	at
org.apache.camel.component.restlet.RestletProducer$1.handle(RestletProducer.java:93)
[camel-restlet-2.10.3.jar:2.10.3]
	at
org.restlet.engine.http.connector.BaseClientHelper.handleInbound(BaseClientHelper.java:714)
[org.restlet-2.0.5.jar:]
	at
org.restlet.engine.http.connector.BaseHelper.handleNextInbound(BaseHelper.java:418)
[org.restlet-2.0.5.jar:]
	at
org.restlet.engine.http.connector.Connection.readMessages(Connection.java:695)
[org.restlet-2.0.5.jar:]
	at org.restlet.engine.http.connector.Controller$2.run(Controller.java:95)
[org.restlet-2.0.5.jar:]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
[rt.jar:1.6.0_45]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[rt.jar:1.6.0_45]
	at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_45]


And this is the route i use,

<route id="callRESTAPI">
        <from uri="direct:inter2" />
		<log message="Routing to RESTAPI" loggingLevel="INFO" />
<setHeader headerName="Authorization">
<simple>Sometokenvalue</simple>
</setHeader>
             <to uri="restlet"http://MYRESTAPI/public/messages"/>
	   <to uri="direct:inter3" />
    </route>

Can you please let me know what am missing here?

Thanks,
Anish



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

Mime
View raw message