OMAttribute name = ele.getAttribute(new QName(Constants.NULL_NAMESPACE, "name"));
if (name == null) {
handleException("The 'name' attribute is required for a named endpoint definition");
} else {
Endpoint endpoint = new Endpoint();
endpoint.setName(name.getAttributeValue());
OMAttribute address = ele.getAttribute(new QName(Constants.NULL_NAMESPACE, "address"));
if (address != null) {
try {
endpoint.setAddress(new URL(address.getAttributeValue()));
config.addNamedEndpoint(endpoint.getName(), endpoint);
} catch (MalformedURLException e) {
handleException("Invalid URL specified for 'address' : " + address.getAttributeValue(), e);
}
}
}