method.addException(new JavaException(name, name, namespace));
Map<String, Part> faultParts = faultMessage.getParts();
Collection<Part> faultValues = faultParts.values();
JavaExceptionClass expClass = new JavaExceptionClass(model);
expClass.setName(name);
expClass.setNamespace(namespace);
expClass.setPackageName(packageName);
S2JJAXBModel jaxbModel = (S2JJAXBModel)env.get(ToolConstants.RAW_JAXB_MODEL);
for (Part part : faultValues) {
String fName = part.getName();
String fType = ProcessorUtil.resolvePartType(part, jaxbModel);
String fNamespace = ProcessorUtil.resolvePartNamespace(part);
String fPackageName = ProcessorUtil.parsePackageName(fNamespace, env.mapPackageName(fNamespace));
JavaField fField = new JavaField(fName, fType, fNamespace);
fField.setQName(ProcessorUtil.getElementName(part));
if (!method.getInterface().getPackageName().equals(fPackageName)) {
fField.setClassName(fPackageName + "." + fType);
}
if (!fType.equals(ProcessorUtil.resolvePartType(part))) {
fField.setClassName(ProcessorUtil.resolvePartType(part, jaxbModel, true));
}
expClass.addField(fField);
}
model.addExceptionClass(name, expClass);
}