Hi,
We are working on a project that exposes both soap and rest web services for
the same underlying interface and impl java classes
In the interface class, we define some annotations at both class and
interface level, which we need to apply business logic based on the
annotations.
e.g.
@WSMTMethod(productionGroup="Internal")
public SampleCalcResponse calculate(SampleCalcParams calcParams ) throws
AppException;
For the soap, we have the following code to get the Method used for the soap
request.
private Method getMethod(Message message) {
Exchange ex = message.getExchange();
BindingOperationInfo op =
(BindingOperationInfo)ex.get(BindingOperationInfo.class);
if(op == null)
return null; //found its null for jaxrs
Service service = ex.get(Service.class);
MethodDispatcher md =
(MethodDispatcher)service.get(MethodDispatcher.class.getName());
return md.getMethod(op);
}
However, this piece of code doesn't work for rest. For rest,
(BindingOperationInfo)ex.get(BindingOperationInfo.class) returns null.
How to get a handler of the underlying interface and impl class/methods
using jaxrs? If BindingOperationInfo is only for soap, what's the equivalent
class for rest?
Thanks in advance,
Li
--
View this message in context:
http://www.nabble.com/How-to-get-the-method-info-for-rest-service-tp24980139p24980139.html
Sent from the cxf-user mailing list archive at Nabble.com.