I found a strange behaviour with the way cxf resolves operations.
If the exchange the position of the method getCatalog and getCatalogList(of
the code below) I end up with:
2/06/2008 12:07:56 org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor
handleMessage
INFO: Found operation: getCatalog
12/06/2008 12:07:56 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
java.lang.NullPointerException
at org.apache.cxf.jaxrs.JAXRSUtils.readFromUriParam(JAXRSUtils.java:513)
but if i have the code as below it resolves correctly as intended.
Am I doing something wrong? Is this going to resolved like so always or
randomly?
@Path("/{franchise}/{location}/{language}/catalog")
public class CatalogRestService {
public CatalogRestService() {
}
@GET
@Path("{catalog}")
public Catalog getCatalog(@PathParam("franchise") String franchise,
@PathParam("location") String location,
@PathParam("language") String language,
@PathParam("catalog") String catalog,
@QueryParam("builddate") String
builddate) throws DataException {
...
}
@GET
public Reference getCatalogList(@PathParam("franchise") String
franchise,
@PathParam("location") String location,
@PathParam("language") String language,
@QueryParam("searchtype") String
searchType,
@QueryParam("searchstring") String
searchString) throws DataException {
...
}
--
View this message in context:
http://www.nabble.com/jax-rs-strange-behaviour-resolving-end-points-tp17791427p17791427.html
Sent from the cxf-user mailing list archive at Nabble.com.