On Thursday, August 11, 2011 10:19:04 PM Willem Jiang 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.

I withdrew the vote for 2.4.2 and rebuilt with the fix for this.   Thus, it 
didn't miss the release train for 2.4.2.   :-)

Dan



> 
> 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="resellerAccountingEndp
> >                    oint"
> >                    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<[email protected]>  
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
-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to