Hi On 07/03/13 07:44, mingchen xiao wrote: > hi dear; > I want to publish more than one service in an interface. > > this is the configuration file > > <jaxrs:server address="/productSignResults"> > <jaxrs:serviceBeans> > <ref bean="productSignResultsServices" /> > <ref bean="productRiskSurveyResultsServices" /> > <ref bean="protocolSignResultsService" /> > </jaxrs:serviceBeans> > <jaxrs:extensionMappings> > <entry key="json" value="application/json" /> > <entry key="xml" value="application/xml" /> > </jaxrs:extensionMappings> > <!--log intercepters --> > <jaxrs:inInterceptors> > <ref bean="inInter" /> > </jaxrs:inInterceptors> > <jaxrs:outInterceptors> > <ref bean="outInter" /> > </jaxrs:outInterceptors> > </jaxrs:server> > > then , i only cat access methods of the first bean > “productSignResultsServices” 。 > cant't access method in "productRiskSurveyResultsServices" and > "protocolSignResultsService" 。 >
I think this is because all 3 root resources have a common @Path value such as "/" ? In CXF 2.8.0 it will just work, in earlier CXFs, you can either register CXF ResourceComparator: http://cxf.apache.org/docs/jax-rs-basics.html#JAX-RSBasics-Customselectionbetweenmultipleresources or try to update resources such that there's no ambiguity in the mappings, example, instead of @Path("/") public class Root1 { @Path("/") @GET get() {} } @Path("/") public class Root2 { @Path("/a") @GET get() {} } update Root2 as follows: @Path("/a") public class Root2 { @Path("/") @GET get() {} } etc HTH, Sergey
