Service locator = (Service) axisCompatibleService.getLocatorClass()
.getConstructor(new Class[0]).newInstance(new Object[0]);
return (Stub) locator.getClass().getMethod("getPort", Class.class)
.invoke(locator, soapServiceDescriptor.getInterfaceClass());
}
throw new ServiceException("Service [" + soapServiceDescriptor +
"] not compatible with Axis", null);
} catch (SecurityException e) {
throw new ServiceException("Unexpected Exception.", e);
} catch (NoSuchMethodException e) {
throw new ServiceException("Unexpected Exception.", e);
} catch (IllegalArgumentException e) {
throw new ServiceException("Unexpected Exception.", e);
} catch (IllegalAccessException e) {
throw new ServiceException("Unexpected Exception.", e);
} catch (InvocationTargetException e) {
throw new ServiceException("Unexpected Exception.", e);
} catch (ClassNotFoundException e) {
throw new ServiceException("Unexpected Exception.", e);
} catch (InstantiationException e) {
throw new ServiceException("Unexpected Exception.", e);
}
}