Handle axisfault when populating data-services
Fix issue 3 in wso2/micro-integrator#2438
@@ -439,6 +439,7 @@ public class DBUtils {
Map<String, AxisService> map = axisConfiguration.getServices();
Set<String> set = map.keySet();
for (String serviceName : set) {
+ try {
AxisService axisService = axisConfiguration.getService(serviceName);
Parameter parameter = axisService.getParameter(DBConstants.AXIS2_SERVICE_TYPE);
if (parameter != null) {
@@ -446,6 +447,14 @@ public class DBUtils {
serviceList.add(serviceName);
}
}
+ } catch (AxisFault axisFault) {
+ if (axisFault.getMessage().contains("inactive")) {
+ log.debug("Ignoring axisFault due to inactive service.");
+ } else {
+ log.error("Error occurred while populating service " + serviceName + " : "
+ + axisFault.getMessage(), axisFault);
+ }
+ }
}
return serviceList.toArray(new String[serviceList.size()]);
}
