public List<Router> addRoutes(Definition def) {
List<Router> routerList = new ArrayList<Router>();
List<ExtensibilityElement> extList = def.getExtensibilityElements();
for (ExtensibilityElement extEl : extList) {
if (extEl instanceof RouteType) {
RouteType rt = (RouteType)extEl;
if (isValidRoute(def, rt)) {
Router router = createRouter(def, rt);
router.init();
routerList.add(router);
} else {
//throw new WebServiceException(
// new Message("UNSUPPORTED_ROUTE", LOG, rt.getName()).toString());
if (LOG.isLoggable(Level.SEVERE)) {
LOG.log(Level.SEVERE, "UNSUPPORTED_ROUTE", rt.getName());
}
}
}
}