private void addBindingOperations(Definition definition, PortType portType, Binding binding)
throws Exception {
List<Operation> ops = (List<javax.wsdl.Operation>)portType.getOperations();
for (Operation op : ops) {
BindingOperation bindingOperation = definition.createBindingOperation();
addCorbaOperationExtElement(bindingOperation, op);
bindingOperation.setName(op.getName());
if (op.getInput() != null) {
BindingInput bindingInput = definition.createBindingInput();
bindingInput.setName(op.getInput().getName());
bindingOperation.setBindingInput(bindingInput);
}
if (op.getOutput() != null) {
BindingOutput bindingOutput = definition.createBindingOutput();
bindingOutput.setName(op.getOutput().getName());
bindingOperation.setBindingOutput(bindingOutput);
}
// add Faults
if (op.getFaults() != null && op.getFaults().size() > 0) {
Map faults = op.getFaults();
Iterator i = faults.values().iterator();
while (i.hasNext()) {
Fault fault = (Fault)i.next();
BindingFault bindingFault = definition.createBindingFault();
bindingFault.setName(fault.getName());
bindingOperation.addBindingFault(bindingFault);
}
}
bindingOperation.setOperation(op);
binding.addBindingOperation(bindingOperation);
}
}