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
}