use of org.apache.cxf.tools.corba.common.idltypes.IdlType in project cxf by apache.
the class WSDLToIDLAction method findIdlType.
private IdlType findIdlType(String local, QName ntype, CorbaType corbatypeImpl) throws Exception {
IdlType idlType = null;
if (ntype.getNamespaceURI().equals(CorbaConstants.NU_WSDL_CORBA)) {
try {
idlType = createPrimitiveType(ntype, local);
} catch (Exception ex) {
ex.printStackTrace();
}
} else {
if (CorbaUtils.isTimeBaseDef(local)) {
root.addInclude("<omg/TimeBase.idl>");
}
String[] name = unscopeName(local);
IdlDefn defn = root.lookup(name);
if (defn != null) {
if (defn instanceof IdlType) {
return (IdlType) defn;
}
String msgStr = local + " is an incorrect idltype.";
org.apache.cxf.common.i18n.Message msg = new org.apache.cxf.common.i18n.Message(msgStr, LOG);
throw new Exception(msg.toString());
}
try {
idlType = createType(ntype, name, corbatypeImpl);
} catch (Exception ex) {
ex.printStackTrace();
}
}
return idlType;
}
use of org.apache.cxf.tools.corba.common.idltypes.IdlType in project cxf by apache.
the class WSDLToIDLAction method createInterface.
private IdlType createInterface(org.apache.cxf.binding.corba.wsdl.Object obj, IdlScopeBase scope, String local) throws Exception {
IdlType result = null;
QName bqname = obj.getBinding();
Binding binding = def.getBinding(bqname);
if (binding != null) {
IdlDefn defn = scope.lookup(local);
if (defn instanceof IdlInterface) {
return (IdlInterface) defn;
} else if (defn == null) {
try {
IdlInterface storedIntf = intf;
intf = IdlInterface.create(scope, local);
scope.holdForScope(intf);
collectIdlDefns(binding);
scope.promoteHeldToScope();
result = intf;
intf = storedIntf;
} catch (Exception ex) {
String msgStr = "Interface type " + intf.fullName() + " not found.";
org.apache.cxf.common.i18n.Message msg = new org.apache.cxf.common.i18n.Message(msgStr, LOG);
throw new Exception(msg.toString());
}
}
}
return result;
}
Aggregations