You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Vas <sr...@gmail.com> on 2013/04/23 14:39:19 UTC
modifying endpoint
Hi,
I have two routes in camel context.
first route is for sync and second for async.
i want the response from first route only(from first.jsp)
<camel:camelContext>
<route id="first">
<from uri="jetty:http://0.0.0.0:8192/test/"/>
<setExchangePattern pattern="InOut"/>
<to uri="http://localhost:8080/app/jsp/first.jsp?bridgeEndpoint=true"/>
<to uri="nmr:async"/>
</route>
<route id="second">
<from uri="nmr:async"/>
<setExchangePattern pattern="InOnly"/>
<to uri="http://localhost:8080/app/jsp/second.jsp?bridgeEndpoint=true"/>
</route>
</camel:camelContext>
i am getting below exception while executing because of my endpoint is
changing dynamically(adding "/test" automatically).
org.apache.camel.component.http.HttpOperationFailedException: HTTP operation
failed invoking http://localhost:8080/app/jsp/second.jsp/test/ with
statusCode: 404
Thanks in advance for your help...
--
View this message in context: http://camel.465427.n5.nabble.com/modifying-endpoint-tp5731360.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: modifying endpoint
Posted by Claus Ibsen <cl...@gmail.com>.
For the HTTP error code then the its returned by the remote server
http://en.wikipedia.org/wiki/HTTP_404
On Thu, Apr 25, 2013 at 4:43 PM, Vas <sr...@gmail.com> wrote:
> Hi Claus,
> i was modified my route as below.
>
> <route id="second">
> <from uri="nmr:async"/>
> <setExchangePattern pattern="InOnly"/>
> <wireTap uri="direct:foo">
> <body> <constant>Bye World</constant></body>
> </wireTap>
> <to uri="http://localhost:8080/app/jsp/second.jsp?bridgeEndpoint=true"/>
> </route>
>
> however I still get the same behavior.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/modifying-endpoint-tp5731360p5731550.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Re: modifying endpoint
Posted by Vas <sr...@gmail.com>.
Hi Claus,
i was modified my route as below.
<route id="second">
<from uri="nmr:async"/>
<setExchangePattern pattern="InOnly"/>
<wireTap uri="direct:foo">
<body> <constant>Bye World</constant></body>
</wireTap>
<to uri="http://localhost:8080/app/jsp/second.jsp?bridgeEndpoint=true"/>
</route>
however I still get the same behavior.
--
View this message in context: http://camel.465427.n5.nabble.com/modifying-endpoint-tp5731360p5731550.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: modifying endpoint
Posted by Madhukar <ma...@tecnotree.com>.
Hi.
I am also facing the same problem. It is appending the entry REST API's
context - /rest/clm/request to the TO address-
http://172.20.33.207:7072/cache-service/rest/cacheservice/CLM/SESSION-CONTEXT/01/SN123456789/rest/clm/request
and I am getting the a 404 response code.
Any workarounds or solutions to this ??
Thanks.
--
View this message in context: http://camel.465427.n5.nabble.com/modifying-endpoint-tp5731360p5732222.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: modifying endpoint
Posted by Claus Ibsen <cl...@gmail.com>.
Maybe not bridge the endpoint, if you need to always call the same url.
On Thu, Apr 25, 2013 at 6:06 PM, Vas <sr...@gmail.com> wrote:
> my actual endpoint is going to be change dynamically(adding "/test"
> automatically).
>
> org.apache.camel.component.http.HttpOperationFailedException: HTTP operation
> failed invoking http://localhost:8080/app/jsp/second.jsp/test/ with
> statusCode: 404
>
> so that getting 404.
> is there any solution to not to change the endpoint.
>
> Thanks.
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/modifying-endpoint-tp5731360p5731554.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Re: modifying endpoint
Posted by Vas <sr...@gmail.com>.
my actual endpoint is going to be change dynamically(adding "/test"
automatically).
org.apache.camel.component.http.HttpOperationFailedException: HTTP operation
failed invoking http://localhost:8080/app/jsp/second.jsp/test/ with
statusCode: 404
so that getting 404.
is there any solution to not to change the endpoint.
Thanks.
--
View this message in context: http://camel.465427.n5.nabble.com/modifying-endpoint-tp5731360p5731554.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: modifying endpoint
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
You can use the wire tap eip to send a tapped message to the 2nd
route. Do that before you call the http endpoint.
On Tue, Apr 23, 2013 at 2:39 PM, Vas <sr...@gmail.com> wrote:
> Hi,
> I have two routes in camel context.
> first route is for sync and second for async.
> i want the response from first route only(from first.jsp)
>
> <camel:camelContext>
> <route id="first">
> <from uri="jetty:http://0.0.0.0:8192/test/"/>
> <setExchangePattern pattern="InOut"/>
> <to uri="http://localhost:8080/app/jsp/first.jsp?bridgeEndpoint=true"/>
> <to uri="nmr:async"/>
> </route>
> <route id="second">
> <from uri="nmr:async"/>
> <setExchangePattern pattern="InOnly"/>
> <to uri="http://localhost:8080/app/jsp/second.jsp?bridgeEndpoint=true"/>
> </route>
> </camel:camelContext>
>
> i am getting below exception while executing because of my endpoint is
> changing dynamically(adding "/test" automatically).
>
> org.apache.camel.component.http.HttpOperationFailedException: HTTP operation
> failed invoking http://localhost:8080/app/jsp/second.jsp/test/ with
> statusCode: 404
>
> Thanks in advance for your help...
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/modifying-endpoint-tp5731360.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen