for (Iterator<?> itf = operation.getFaults().values().iterator(); itf.hasNext();) {
Fault fault = (Fault) itf.next();
BindingFault bindingFault = def.createBindingFault();
bindingFault.setName(fault.getName());
if (soap11) {
SOAPFault soapFault = new SOAPFaultImpl();
soapFault.setUse("literal");
soapFault.setName(fault.getName());
bindingFault.addExtensibilityElement(soapFault);
} else {
SOAP12Fault soapFault = new SOAP12FaultImpl();
soapFault.setUse("literal");
soapFault.setName(fault.getName());
bindingFault.addExtensibilityElement(soapFault);
}
bindingOp.addBindingFault(bindingFault);
}
return bindingOp;