use of org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.FaultBean in project cxf by apache.
the class FaultBeanGenerator method generateBeanClasses.
protected Collection<JavaClass> generateBeanClasses(final ServiceInfo serviceInfo) {
Set<Class<?>> exceptionClasses = new HashSet<>();
String seiPackageName = null;
for (OperationInfo op : serviceInfo.getInterface().getOperations()) {
Method method = (Method) op.getProperty("operation.method");
exceptionClasses.addAll(getExceptionClasses(method));
seiPackageName = getSEIPackage(method);
}
Collection<JavaClass> faultBeanClasses = new HashSet<>();
String defaultPackage = seiPackageName + ".jaxws";
FaultBean bean = new FaultBean();
for (Class<?> clz : exceptionClasses) {
if (!bean.faultBeanExists(clz)) {
faultBeanClasses.add(bean.transform(clz, defaultPackage));
}
}
return faultBeanClasses;
}
Aggregations