camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From contactreji <contactr...@gmail.com>
Subject http4 component - producer endpoint config - http 401 error
Date Tue, 29 Sep 2015 10:20:53 GMT
Hi guys

Am trying to hit a REST API using camel http4 component.

But I get following exception - 

*Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
org.apache.camel.component.http4.HttpOperationFailedException: HTTP
operation failed invoking
http://stage-api.target.com/v2/location?key=KiTA3ErWjEeJh6C3wSeUwvJyMv3lk0PA+
with statusCode: 401
	at
org.apache.camel.component.http4.HttpProducer.populateHttpOperationFailedException(HttpProducer.java:236)
	at
org.apache.camel.component.http4.HttpProducer.process(HttpProducer.java:163)
	at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:129)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
	at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448)
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
	at
org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:165)
	at
org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:73)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)*


I tried the same from SOAP UI - And I have following log in Soap UI. All
seems neat and API is working perfectly fine via Soap UI.

Can you suggest what could be the necessary settings which is missing on my
http4 endpoint?


SOAP UI LOG
-------------------
Tue Sep 29 15:42:39 IST 2015:DEBUG:Attempt 1 to execute request
Tue Sep 29 15:42:39 IST 2015:DEBUG:Sending request: GET
http://stage-api.target.com/v2/location?key=KiTA3ErWjEeJh6C3wSeUwvJyMv3lk0PA
HTTP/1.1
Tue Sep 29 15:42:40 IST 2015:DEBUG:Receiving response: HTTP/1.1 302 Found
Tue Sep 29 15:42:40 IST 2015:DEBUG:Connection can be kept alive indefinitely
Tue Sep 29 15:42:40 IST 2015:DEBUG:Sending request: CONNECT
storage101.dfw1.clouddrive.com:443 HTTP/1.1
Tue Sep 29 15:42:40 IST 2015:DEBUG:Receiving response: HTTP/1.1 200
Connection established
Tue Sep 29 15:42:40 IST 2015:DEBUG:Tunnel to target created.
Tue Sep 29 15:42:40 IST 2015:DEBUG:Attempt 1 to execute request
Tue Sep 29 15:42:40 IST 2015:DEBUG:Sending request: GET
/v1/MossoCloudFS_a3913144-fa23-4e09-8e56-9e4d5d2a7101/esv-locations-v2-stage/location_providers/full/locations_2015-09-29.xml?temp_url_sig=cc4d2c061ed57cecd10abee5f61e733700f06371&temp_url_expires=1443607499
HTTP/1.1
Tue Sep 29 15:42:56 IST 2015:DEBUG:Receiving response: HTTP/1.1 200 OK
Tue Sep 29 15:42:56 IST 2015:DEBUG:Connection can be kept alive indefinitely
Tue Sep 29 15:43:06 IST 2015:DEBUG:Connection shut down
Tue Sep 29 15:43:06 IST
2015:INFO:[http://stage-api.target.com.Location:Request 1] - CANCELED
Tue Sep 29 15:43:06 IST 2015:ERROR:An error occurred [Socket is closed], see
error log for details
Tue Sep 29 15:43:13 IST 2015:DEBUG:Connection closed



-----
Reji Mathews
Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel & Jboss Fuse
ESB | Mule ESB )
LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
Twitter - reji_mathews
--
View this message in context: http://camel.465427.n5.nabble.com/http4-component-producer-endpoint-config-http-401-error-tp5772087.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message