You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Srivatsa Katta <va...@gmail.com> on 2009/06/29 20:33:54 UTC

Response propogation from cxfbean

Hi,

Am having a jetty endpoint which has been backed by the CXF bean processor,
am using jax-rs compatible cxfbean component. It absolutely works fine in
happy path scenarios, but if I have to return the custom cxf Response by
setting the http status code explicitly the same response is not propagated
back by to the client. 

For Eg:

If I have a POST method in CXF service, on successful execution of POST
method (lets say creation of entity), I return a custom cxf Response object
(which is a generic pattern used in CXF afaik) by setting http status code
to 301. The same http status code is not returned to the camel client.

Am wondering if this is a standard procedure used while using cxf beans, if
it is then why is camel not propagating the same to the client ? If its not
the standard practice to return custom response from cxf beans how does the
client knows if the POST method is successful or not ? how do we return
custom http status codes instead of returning 200 in case of success and 500
in case of error/exception (which is what camel returns by default)

Any help regarding this is appreciated..

PS: Am using Camel 2.0 M2 release.

Cheers!!
Katta
-- 
View this message in context: http://www.nabble.com/Response-propogation-from-cxfbean-tp24259344p24259344.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Response propogation from cxfbean

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Jun 30, 2009 at 8:17 AM, Srivatsa Katta<va...@gmail.com> wrote:
>
> Thanks a lot William, when is the next release of 2.0 scheduled ?
>
> I have read there are no more milestone 2.0 releases, so am assuming the
> next release gonna be the final 2.0 release.
Yes the next is gonna be a RC that can be voted as final if no issues
has been discovered during the voting process.
Fingers crossed for a mid July release.


>
> Or if you can tell me the revision number for this fix, I will apply patch
> and keep going with the fix. Thanks in advance.
Author: wtam
Date: Tue Jun 30 01:51:27 2009
New Revision: 789534

URL: http://svn.apache.org/viewvc?rev=789534&view=rev
Log:
[CAMEL-1774] cxfbean does not propagate in http response code to Camel header


>
> Cheers!!
> Katta
>
>
>
> William Tam wrote:
>>
>> A fix has been submitted to the trunk.
>> https://issues.apache.org/activemq/browse/CAMEL-1774
>>
>> Thanks,
>> William
>>
>> On Mon, Jun 29, 2009 at 8:12 PM, William Tam<em...@gmail.com> wrote:
>>> It sounds like a bug.  I'll take a look.   Thanks.
>>>
>>> On Mon, Jun 29, 2009 at 2:33 PM, Srivatsa Katta<va...@gmail.com>
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> Am having a jetty endpoint which has been backed by the CXF bean
>>>> processor,
>>>> am using jax-rs compatible cxfbean component. It absolutely works fine
>>>> in
>>>> happy path scenarios, but if I have to return the custom cxf Response by
>>>> setting the http status code explicitly the same response is not
>>>> propagated
>>>> back by to the client.
>>>>
>>>> For Eg:
>>>>
>>>> If I have a POST method in CXF service, on successful execution of POST
>>>> method (lets say creation of entity), I return a custom cxf Response
>>>> object
>>>> (which is a generic pattern used in CXF afaik) by setting http status
>>>> code
>>>> to 301. The same http status code is not returned to the camel client.
>>>>
>>>> Am wondering if this is a standard procedure used while using cxf beans,
>>>> if
>>>> it is then why is camel not propagating the same to the client ? If its
>>>> not
>>>> the standard practice to return custom response from cxf beans how does
>>>> the
>>>> client knows if the POST method is successful or not ? how do we return
>>>> custom http status codes instead of returning 200 in case of success and
>>>> 500
>>>> in case of error/exception (which is what camel returns by default)
>>>>
>>>> Any help regarding this is appreciated..
>>>>
>>>> PS: Am using Camel 2.0 M2 release.
>>>>
>>>> Cheers!!
>>>> Katta
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Response-propogation-from-cxfbean-tp24259344p24259344.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Response-propogation-from-cxfbean-tp24259344p24266670.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Response propogation from cxfbean

Posted by Srivatsa Katta <va...@gmail.com>.
Thanks a lot William, when is the next release of 2.0 scheduled ?

I have read there are no more milestone 2.0 releases, so am assuming the
next release gonna be the final 2.0 release. 

Or if you can tell me the revision number for this fix, I will apply patch
and keep going with the fix. Thanks in advance.

Cheers!!
Katta



William Tam wrote:
> 
> A fix has been submitted to the trunk.
> https://issues.apache.org/activemq/browse/CAMEL-1774
> 
> Thanks,
> William
> 
> On Mon, Jun 29, 2009 at 8:12 PM, William Tam<em...@gmail.com> wrote:
>> It sounds like a bug.  I'll take a look.   Thanks.
>>
>> On Mon, Jun 29, 2009 at 2:33 PM, Srivatsa Katta<va...@gmail.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> Am having a jetty endpoint which has been backed by the CXF bean
>>> processor,
>>> am using jax-rs compatible cxfbean component. It absolutely works fine
>>> in
>>> happy path scenarios, but if I have to return the custom cxf Response by
>>> setting the http status code explicitly the same response is not
>>> propagated
>>> back by to the client.
>>>
>>> For Eg:
>>>
>>> If I have a POST method in CXF service, on successful execution of POST
>>> method (lets say creation of entity), I return a custom cxf Response
>>> object
>>> (which is a generic pattern used in CXF afaik) by setting http status
>>> code
>>> to 301. The same http status code is not returned to the camel client.
>>>
>>> Am wondering if this is a standard procedure used while using cxf beans,
>>> if
>>> it is then why is camel not propagating the same to the client ? If its
>>> not
>>> the standard practice to return custom response from cxf beans how does
>>> the
>>> client knows if the POST method is successful or not ? how do we return
>>> custom http status codes instead of returning 200 in case of success and
>>> 500
>>> in case of error/exception (which is what camel returns by default)
>>>
>>> Any help regarding this is appreciated..
>>>
>>> PS: Am using Camel 2.0 M2 release.
>>>
>>> Cheers!!
>>> Katta
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Response-propogation-from-cxfbean-tp24259344p24259344.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Response-propogation-from-cxfbean-tp24259344p24266670.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Response propogation from cxfbean

Posted by William Tam <em...@gmail.com>.
A fix has been submitted to the trunk.
https://issues.apache.org/activemq/browse/CAMEL-1774

Thanks,
William

On Mon, Jun 29, 2009 at 8:12 PM, William Tam<em...@gmail.com> wrote:
> It sounds like a bug.  I'll take a look.   Thanks.
>
> On Mon, Jun 29, 2009 at 2:33 PM, Srivatsa Katta<va...@gmail.com> wrote:
>>
>> Hi,
>>
>> Am having a jetty endpoint which has been backed by the CXF bean processor,
>> am using jax-rs compatible cxfbean component. It absolutely works fine in
>> happy path scenarios, but if I have to return the custom cxf Response by
>> setting the http status code explicitly the same response is not propagated
>> back by to the client.
>>
>> For Eg:
>>
>> If I have a POST method in CXF service, on successful execution of POST
>> method (lets say creation of entity), I return a custom cxf Response object
>> (which is a generic pattern used in CXF afaik) by setting http status code
>> to 301. The same http status code is not returned to the camel client.
>>
>> Am wondering if this is a standard procedure used while using cxf beans, if
>> it is then why is camel not propagating the same to the client ? If its not
>> the standard practice to return custom response from cxf beans how does the
>> client knows if the POST method is successful or not ? how do we return
>> custom http status codes instead of returning 200 in case of success and 500
>> in case of error/exception (which is what camel returns by default)
>>
>> Any help regarding this is appreciated..
>>
>> PS: Am using Camel 2.0 M2 release.
>>
>> Cheers!!
>> Katta
>> --
>> View this message in context: http://www.nabble.com/Response-propogation-from-cxfbean-tp24259344p24259344.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>

Re: Response propogation from cxfbean

Posted by William Tam <em...@gmail.com>.
It sounds like a bug.  I'll take a look.   Thanks.

On Mon, Jun 29, 2009 at 2:33 PM, Srivatsa Katta<va...@gmail.com> wrote:
>
> Hi,
>
> Am having a jetty endpoint which has been backed by the CXF bean processor,
> am using jax-rs compatible cxfbean component. It absolutely works fine in
> happy path scenarios, but if I have to return the custom cxf Response by
> setting the http status code explicitly the same response is not propagated
> back by to the client.
>
> For Eg:
>
> If I have a POST method in CXF service, on successful execution of POST
> method (lets say creation of entity), I return a custom cxf Response object
> (which is a generic pattern used in CXF afaik) by setting http status code
> to 301. The same http status code is not returned to the camel client.
>
> Am wondering if this is a standard procedure used while using cxf beans, if
> it is then why is camel not propagating the same to the client ? If its not
> the standard practice to return custom response from cxf beans how does the
> client knows if the POST method is successful or not ? how do we return
> custom http status codes instead of returning 200 in case of success and 500
> in case of error/exception (which is what camel returns by default)
>
> Any help regarding this is appreciated..
>
> PS: Am using Camel 2.0 M2 release.
>
> Cheers!!
> Katta
> --
> View this message in context: http://www.nabble.com/Response-propogation-from-cxfbean-tp24259344p24259344.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>