use of org.apache.cxf.tools.corba.common.idltypes.IdlOperation in project cxf by apache.
the class WSDLToIDLAction method createIdlOperation.
public void createIdlOperation(org.apache.cxf.binding.corba.wsdl.OperationType opType, String name, boolean isOneway) throws Exception {
IdlOperation idlOp = IdlOperation.create(intf, opType.getName(), isOneway);
intf.holdForScope(idlOp);
ArgType crt = opType.getReturn();
if (crt != null) {
IdlType rt = findType(crt.getIdltype());
idlOp.addReturnType(rt);
}
for (ParamType arg : opType.getParam()) {
IdlType type = findType(arg.getIdltype());
String mode = arg.getMode().value();
IdlParam param = IdlParam.create(idlOp, arg.getName(), type, mode);
idlOp.addParameter(param);
}
for (RaisesType rs : opType.getRaises()) {
IdlType type = findType(rs.getException());
if (type instanceof IdlException) {
idlOp.addException((IdlException) type);
} else {
String msgStr = type.fullName() + " is not a type.";
org.apache.cxf.common.i18n.Message msg = new org.apache.cxf.common.i18n.Message(msgStr, LOG);
throw new Exception(msg.toString());
}
}
root.flush();
intf.promoteHeldToScope();
}
Aggregations