flatOper.setUndefined(false);
if (defOper.getInput() != null) {
Input flatInput = flat.createInput();
flatInput.setName(defOper.getInput().getName());
if (defOper.getInput().getMessage() != null) {
Message flatInputMsg = copyMessage(defOper.getInput().getMessage(), flat);
flatInput.setMessage(flatInputMsg);
flat.addMessage(flatInputMsg);
}
flatOper.setInput(flatInput);
}
if (defOper.getOutput() != null) {
Output flatOutput = flat.createOutput();
flatOutput.setName(defOper.getOutput().getName());
if (defOper.getOutput().getMessage() != null) {
Message flatOutputMsg = copyMessage(defOper.getOutput().getMessage(), flat);
flatOutput.setMessage(flatOutputMsg);
flat.addMessage(flatOutputMsg);
}
flatOper.setOutput(flatOutput);
}
for (Iterator itFault = defOper.getFaults().values().iterator(); itFault.hasNext();) {
Fault defFault = (Fault) itFault.next();
Fault flatFault = flat.createFault();
flatFault.setName(defFault.getName());
if (defFault.getMessage() != null) {
Message flatFaultMsg = copyMessage(defFault.getMessage(), flat);
flatFault.setMessage(flatFaultMsg);
flat.addMessage(flatFaultMsg);
}
flatOper.addFault(flatFault);
}