Hi All,
I have defined a following route in my camel config xml

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

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

String servletURL
="http://localhost:8085/camel-example-servlet-tomcat-no-spring-2.11.0/camel/hello?name=test123";;

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: 
http://camel.465427.n5.nabble.com/regarding-status-code-302-tp5733545.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to