Hi Willem,
no problem, I can live with an extra <import/> statement in the meanwhile :)

Thanks for taking care of this in the upcoming releases of CXF.

Mirko

On Thu, Aug 11, 2011 at 4:19 PM, Willem Jiang <willem.ji...@gmail.com> wrote:
> Hi Mirko,
>
> After I add a simple test I found that jaxrs:server will use the
> BusFactory.getDeafultThreadBus() when the bus is not set, it will make the
> jaxrs server using a bus which is not wired with CXF Servlet.
> And it can explain that the jaxrs server doesn't show up in service list.
>
> In Camel 2.7.x, camel-cxf is using the old CXF bus updating API which may
> work around that kind of issue.
>
> I will work a patch of CXF about it shortly , but it just missed the release
> train of CXF 2.4.2.
>
> On 8/11/11 8:38 PM, Mirko Caserta wrote:
>>
>> Hi Willem,
>> adding a depends-on="camelContext" didn't work.
>>
>> However,
>>
>>     <jaxrs:server id="restService"
>>                   depends-on="resellerAccountingEndpoint"
>>                   address="/restService">
>>
>> where resellerAccountingEndpoint is the<cxf:cxfEndpoint/>  soap
>> endpoint did work and I can see the rest endpoint being correctly
>> initialized.
>>
>> Hope this helps.
>>
>> Mirko
>>
>> On Thu, Aug 11, 2011 at 1:21 PM, Willem Jiang<willem.ji...@gmail.com>
>>  wrote:
>>>
>>> Hi Mirko,
>>>
>>> I checked the camel route that you sent to me, I didn't find any
>>> jaxws:endpoint.
>>>
>>> jaxrs:server and cxf:cxfEndpoit are using the same code to find a bus to
>>> wire. Can you try to add depends-on attribute on the jaxrs:server to let
>>> it
>>> depends-on camel context ?
>>>
>>> In this way I guess the jaxrs:server can be loaded after the cxf bus is
>>> created rightly.
>>>
>>> On 8/11/11 5:42 PM, Mirko Caserta wrote:
>>>>
>>>> Hi Willem,
>>>> thanks for investigating this.
>>>>
>>>> The attached file is the version which works. To make it not work, the
>>>> only difference is that I'll have to remove this line:
>>>>
>>>> <import resource="classpath:META-INF/cxf/cxf.xml" />
>>>>
>>>> Also, please note that the rest endpoint is not wired into the camel
>>>> context but is directly connected to a bean implementation. Maybe this
>>>> is what makes a difference.
>>>>
>>>> Again, thanks.
>>>>
>>>> Mirko
>>>
>>>
>>> --
>>> Willem
>>> ----------------------------------
>>> FuseSource
>>> Web: http://www.fusesource.com
>>> Blog:    http://willemjiang.blogspot.com (English)
>>>         http://jnn.javaeye.com (Chinese)
>>> Twitter: willemjiang
>>> Weibo: willemjiang
>>>
>>
>
>
> --
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>         http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
> Weibo: willemjiang
>

Reply via email to