addSchemaValidationSupport(ep, cls.getAnnotation(SchemaValidation.class));
addFastInfosetSupport(ep, cls.getAnnotation(FastInfoset.class));
addGZipSupport(ep, bus, cls.getAnnotation(GZIP.class));
addLoggingSupport(ep, bus, cls.getAnnotation(Logging.class));
addEndpointProperties(ep, bus, cls.getAnnotation(EndpointProperty.class));
EndpointProperties props = cls.getAnnotation(EndpointProperties.class);
if (props != null) {
addEndpointProperties(ep, bus, props.value());
}
// To avoid the NPE
if (implCls == null || implCls == cls) {
return;
}
WSDLDocumentation doc = implCls.getAnnotation(WSDLDocumentation.class);
if (doc != null) {
addDocumentation(ep, WSDLDocumentation.Placement.SERVICE, doc);
}
WSDLDocumentationCollection col = implCls.getAnnotation(WSDLDocumentationCollection.class);
if (col != null) {
addDocumentation(ep, WSDLDocumentation.Placement.SERVICE, col.value());
}
InterfaceInfo i = ep.getEndpointInfo().getInterface();
List<WSDLDocumentation> docs = CastUtils.cast((List<?>)i.removeProperty(EXTRA_DOCUMENTATION));
if (docs != null) {
addDocumentation(ep,
WSDLDocumentation.Placement.SERVICE,
docs.toArray(new WSDLDocumentation[docs.size()]));
}
addBindingOperationDocs(ep);
break;
}
case SERVER_CREATED: {
Class<?> cls = (Class<?>)args[2];
if (cls == null) {
return;
}
Server server = (Server)args[0];
Bus bus = factory.getBus();
addGZipSupport(server.getEndpoint(), bus, cls.getAnnotation(GZIP.class));
addSchemaValidationSupport(server.getEndpoint(), cls.getAnnotation(SchemaValidation.class));
addFastInfosetSupport(server.getEndpoint(), cls.getAnnotation(FastInfoset.class));
addLoggingSupport(server.getEndpoint(), bus, cls.getAnnotation(Logging.class));
addEndpointProperties(server.getEndpoint(), bus, cls.getAnnotation(EndpointProperty.class));
EndpointProperties props = cls.getAnnotation(EndpointProperties.class);
if (props != null) {
addEndpointProperties(server.getEndpoint(), bus, props.value());
}
setScope(factory, server, cls);
break;
}
case INTERFACE_OPERATION_BOUND: {