Operation operation,
BindingOperation bindingOperation) {
String exceptionName = node.toString();
// message
Message faultMsg = definition.createMessage();
faultMsg.setQName(new QName(definition.getTargetNamespace(), exceptionName));
faultMsg.setUndefined(false);
// message - part
Part part = definition.createPart();
part.setName("exception");
// REVISIT: should be reading QName from exception XmlSchemaElement
// part.setElementName(element.getQName());
part.setElementName(new QName(definition.getTargetNamespace(), exceptionName));
faultMsg.addPart(part);
// porttype - operation - fault
Fault fault = definition.createFault();
fault.setMessage(faultMsg);
fault.setName(faultMsg.getQName().getLocalPart());
operation.addFault(fault);
// binding - operation - corba:operation - corba:raises
RaisesType raisesType = new RaisesType();
raisesType.setException(new QName(typeMap.getTargetNamespace(),
exceptionName));
corbaOperation.getRaises().add(raisesType);
// binding - operation - fault
BindingFault bindingFault = definition.createBindingFault();
bindingFault.setName(faultMsg.getQName().getLocalPart());
bindingOperation.addBindingFault(bindingFault);
definition.addMessage(faultMsg);
}