if (service == null) {
service = serviceFactory.create();
}
EndpointInfo ei = createEndpointInfo(service);
Endpoint ep = new EndpointImpl(getBus(), service, ei);
if (properties != null) {
ep.putAll(properties);
}
if (getInInterceptors() != null) {
ep.getInInterceptors().addAll(getInInterceptors());
}
if (getOutInterceptors() != null) {
ep.getOutInterceptors().addAll(getOutInterceptors());
}
if (getInFaultInterceptors() != null) {
ep.getInFaultInterceptors().addAll(getInFaultInterceptors());
}
if (getOutFaultInterceptors() != null) {
ep.getOutFaultInterceptors().addAll(getOutFaultInterceptors());
}
List<ClassResourceInfo> list = serviceFactory.getRealClassResourceInfo();
for (ClassResourceInfo cri : list) {
initializeAnnotationInterceptors(ep, cri.getServiceClass());