Hi Make sure you have the annotation right. I.e., it needs to be sth like below:
@Get @HttpResource(location="/channelName/{id}") public String getChannelName(@WebParam(name = "GetBook") GetChannel getChannel); If this still does not work, try to play with wrapped and unwrapped style. eg, sf.getServiceFactory().setWrapped(false); Let me know how you are getting on. Cheers, Jervis Tolan, Michael E wrote: > > I'm having trouble with parameters in a RESTful service. > > After going over the User's guide, I think I understand that the {} > element in a HttpResource annotation should name a bean property on the > object argument to the implementation function. However, when I try to > set this up, it doesn't seem that the bean is ever initialized > correctly. > > > > I suspect I'm doing something wrong, and would appreciate it if someone > could point me at what that might be. > > In case it's relevant, I'm using the 2.0.2 version of cxf. > > > > -Mike > > > > > > SEI: > > ------------------------------ > > import org.codehaus.jra.Get; > > import org.codehaus.jra.HttpResource; > > > > @Get > > @HttpResource(location="/channelName/{id}") > > public String getChannelName(GetChannel getChannel); > > > > > > > > GetChannel.java: > > ------------------------------ > > public class GetChannel { > > private String id; > > public GetChannel() {} > > public String getId() {return id;} > > public void setId(String id) {this.id = id;} > > } > > > > > > Implementaiton: > > ------------------------------- > > public String getChannelName(GetChannel getChannel) { > > Logger log = Logger.getLogger(BoardServiceImpl.class); > > log.debug("getChannelName: "+getChannel); //getChannel > is null > > } > > > > > > > -- View this message in context: http://www.nabble.com/Parameters-in-Restful-services-tf4641537.html#a13286805 Sent from the cxf-user mailing list archive at Nabble.com.