public boolean supports(Object endpoint) {
return endpoint.getClass().getAnnotation(WebServiceProvider.class) != null && endpoint instanceof Provider;
}
public void invoke(MessageContext messageContext, Object endpoint) throws Exception {
ServiceMode serviceMode = endpoint.getClass().getAnnotation(ServiceMode.class);
if (serviceMode == null || Service.Mode.PAYLOAD.equals(serviceMode.value())) {
invokeSourceProvider(messageContext, (Provider<Source>) endpoint);
}
else if (Service.Mode.MESSAGE.equals(serviceMode.value())) {
Provider<SOAPMessage> provider = (Provider<SOAPMessage>) endpoint;
invokeMessageProvider(messageContext, provider);
}
}