camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From indrayani <>
Subject regarding status code 302
Date Fri, 31 May 2013 09:54:13 GMT
Hi All,
I have defined a following route in my camel config xml

    <from uri="servlet:///hello"/>
    <to uri="http://localhost:8085/testagent?bridgeEndpoint=true" />

I am sending a request through following code from a web application :

String servletURL

HttpClient client = new DefaultHttpClient();  
HttpPost post = new HttpPost(servletURL); 
HttpResponse response = client.execute(post, context);

when i execute this code , I am getting following error

 caught: org.apache.camel.component.http.HttpOperationFailedException: HTTP
operation failed invoking http://localhost:8085/erpagent?name=test123 with
statusCode: 302

I chcked on forum regarding this error and what I understood is , we need to
login to URL first.
but this url "http://localhost:8085/testagent?bridgeEndpoint=true"  is just
a simple servlet and there is no login required.

So, how should I resolve this issue now, basically , I am not able to
understanding why am I getting this exception.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message