camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-3117) cxfbean and cxfrs components should honour jax-rs providers in the bean registry
Date Fri, 12 Nov 2010 11:07:24 GMT

    [ https://issues.apache.org/activemq/browse/CAMEL-3117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63301#action_63301
] 

Willem Jiang commented on CAMEL-3117:
-------------------------------------

If you want to add the provider into the camel cxfrs endpoint, you need to do the thing like
this
{code}
<cxf:rsServer id="rsServer" address="http://localhost:9000/router"
    serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService">
    <cxf:providers>
       <ref bean="jsonProvider"/>
    </cxf:providers>
  </cxf:rsServer>

  <bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.JSONProvider"/>

   <!-- The camel route context -->
  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
    <route>
       <from uri="cxfrs://bean://rsServer"/>
       <!-- We can remove this configure as the CXFRS producer is using the HttpAPI by
default -->
       <setHeader headerName="CamelCxfRsUsingHttpAPI">
         <constant>True</constant>        
       </setHeader>
       <to uri="cxfrs://bean://rsClient"/>
    </route>
  </camelContext>
{code}

> cxfbean and cxfrs components should honour jax-rs providers in the bean registry
> --------------------------------------------------------------------------------
>
>                 Key: CAMEL-3117
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3117
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-cxf
>    Affects Versions: 2.4.0
>         Environment: cxfrs and cxfbean
>            Reporter: Christopher Hunt
>            Assignee: Willem Jiang
>             Fix For: 2.5.0
>
>         Attachments: providers.diff
>
>
> The cxfbean component does not presently provide a means of using custom providers i.e.
those customised JAX-RS classes that are annotated with the @Provider declaration. 
> My recommendation is that objects instantiated in the bean container from classes annotated
with @Provider are automatically registered for use by the cxfrs and cxfbean components. This
includes message body writers/readers and parameter handlers i.e. anything that can be presently
expressed in the cxf:rsServer/providers element.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message