if (serviceName != null) {
List<ServiceInfo> services = serviceBuilder
.buildServices(definition, getServiceQName(definition));
serviceList.addAll(services);
} else if (definition.getServices().size() > 0) {
serviceList = serviceBuilder.buildServices(definition);
} else {
serviceList = serviceBuilder.buildMockServices(definition);
}
//remove definition from cache so that won't fail when encounter same wsdl file
//name but different wsdl content(CXF-3340)