// set endpoints
ArrayList endpoints = getEndpoints(loadbalanceElement, loadbalanceEndpoint);
loadbalanceEndpoint.setEndpoints(endpoints);
// set load balance algorithm
LoadbalanceAlgorithm algorithm = LoadbalanceAlgorithmFactory.
createLoadbalanceAlgorithm(loadbalanceElement, endpoints);
loadbalanceEndpoint.setAlgorithm(algorithm);
// set if failover is turned off
String failover = loadbalanceElement.getAttributeValue(new QName("failover"));