Map faults = wsdl4jOperation.getFaults();
Iterator faultKeyIterator = faults.keySet().iterator();
while (faultKeyIterator.hasNext()) {
Fault fault = (Fault) faults.get(faultKeyIterator.next());
AxisMessage axisFaultMessage = new AxisMessage();
addDocumentation(axisFaultMessage,fault.getDocumentationElement());
axisFaultMessage.addParameter(FAULT_NAME, fault.getName());
Message faultMessage = fault.getMessage();
if (null != faultMessage) {
axisFaultMessage
.setName(faultMessage.getQName().getLocalPart());
copyExtensibleElements(faultMessage.getExtensibilityElements(),
dif, axisFaultMessage, PORT_TYPE_OPERATION_FAULT);
}
// Check if the action is already set as we don't want to override
// it
// with the Default Action Pattern
String action = axisOperation.getFaultAction(fault.getName());
if (action == null) {
action = WSDL11ActionHelper.getActionFromFaultElement(dif,
wsdl4jPortType,
wsdl4jOperation, fault);
}
if (action != null) {
axisOperation.addFaultAction(fault.getName(), action);
}
// Also add mapping from Exception name to fault action
String faultMessageName = axisFaultMessage.getName();
if (null != faultMessageName) {