You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by kafe <er...@gmail.com> on 2011/11/14 19:25:01 UTC
CFX - how to manage webservice response
Hi all,
I'm new with Camel and currently, i'm trying to call a web service through
CXF and, depending on the response (a simple String), put the message on a
queue.
To be clear, i have configured a simple route like that :
<route id="manageSoapRequest">
<from uri="cxf:bean:getUserInfoEndpoint" />
<to uri="cxf:bean:getDistantUserInfoEndpoint" />
</route>
That works, i manage to expose my route as a webservice and call the distant
web service but what i'd like to do now is getting the answer and, if the
answer is 'KO' (the service could not do the job), putting the message in a
jms queue to call again the web service later.
How can i do that ?
Thanks a lot in advance for your help.
--
View this message in context: http://camel.465427.n5.nabble.com/CFX-how-to-manage-webservice-response-tp4991939p4991939.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CFX - how to manage webservice response
Posted by Raul Kripalani <ra...@fusesource.com>.
In addition to this, you can also use Camel's error handling features
to detect this situation and raise an exception in the route, which
you can then capture in your error handler.
You can configure a redelivery policy on your error handler and
ultimately send the message to a dead letter channel to process it
later if all redelivery attempts are exhausted.
The dead letter channel can be any Camel endpoint, including a JMS destination.
Hope this helps.
Regards,
Raul.
On 14 Nov 2011, at 20:18, Taariq Levack <ta...@gmail.com> wrote:
> I'd look at a message filter[1], or a content based router[2].
>
> [1] http://camel.apache.org/message-filter.html
>
> [2] http://camel.apache.org/content-based-router.html
>
> Taariq
>
> On 14 Nov 2011, at 8:25 PM, kafe <er...@gmail.com> wrote:
>
>> Hi all,
>>
>> I'm new with Camel and currently, i'm trying to call a web service through
>> CXF and, depending on the response (a simple String), put the message on a
>> queue.
>>
>> To be clear, i have configured a simple route like that :
>>
>> <route id="manageSoapRequest">
>> <from uri="cxf:bean:getUserInfoEndpoint" />
>> <to uri="cxf:bean:getDistantUserInfoEndpoint" />
>> </route>
>>
>> That works, i manage to expose my route as a webservice and call the distant
>> web service but what i'd like to do now is getting the answer and, if the
>> answer is 'KO' (the service could not do the job), putting the message in a
>> jms queue to call again the web service later.
>>
>> How can i do that ?
>>
>> Thanks a lot in advance for your help.
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/CFX-how-to-manage-webservice-response-tp4991939p4991939.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CFX - how to manage webservice response
Posted by Taariq Levack <ta...@gmail.com>.
I'd look at a message filter[1], or a content based router[2].
[1] http://camel.apache.org/message-filter.html
[2] http://camel.apache.org/content-based-router.html
Taariq
On 14 Nov 2011, at 8:25 PM, kafe <er...@gmail.com> wrote:
> Hi all,
>
> I'm new with Camel and currently, i'm trying to call a web service through
> CXF and, depending on the response (a simple String), put the message on a
> queue.
>
> To be clear, i have configured a simple route like that :
>
> <route id="manageSoapRequest">
> <from uri="cxf:bean:getUserInfoEndpoint" />
> <to uri="cxf:bean:getDistantUserInfoEndpoint" />
> </route>
>
> That works, i manage to expose my route as a webservice and call the distant
> web service but what i'd like to do now is getting the answer and, if the
> answer is 'KO' (the service could not do the job), putting the message in a
> jms queue to call again the web service later.
>
> How can i do that ?
>
> Thanks a lot in advance for your help.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/CFX-how-to-manage-webservice-response-tp4991939p4991939.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CXF - how to manage webservice response
Posted by kafe <er...@gmail.com>.
Ok guys, thank you for your answers. I'm going to try to use error handling.
@Gnanaguru S, you will probably find what you are looking for at this adress
: http://camel.apache.org/cxf.html , especially the chapter "Configure the
CXF endpoints with Spring"
I'm not using service mix, i use Camel embeded in a JBoss 5.1.0.
--
View this message in context: http://camel.465427.n5.nabble.com/CXF-how-to-manage-webservice-response-tp4991939p4993778.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CXF - how to manage webservice response
Posted by Gnanaguru S <gn...@wipro.com>.
Hi Kafe,
I am working on camel-cxf for the long time. can you give me some simple
idea how you are making a webservice as a endpoint.
How you are deploying it?. Do you use servicemix?.
Can you explain with some simple code. It will be a big help at this time./
Regards
Guru
--
View this message in context: http://camel.465427.n5.nabble.com/CXF-how-to-manage-webservice-response-tp4991939p4993473.html
Sent from the Camel - Users mailing list archive at Nabble.com.