Search in sources :

Example 1 with IdlStruct

use of org.apache.cxf.tools.corba.common.idltypes.IdlStruct in project cxf by apache.

the class WSDLToIDLAction method createStruct.

private IdlType createStruct(Struct s, IdlScopeBase scope, String local) throws Exception {
    boolean undefinedCircular = false;
    IdlStruct struct = IdlStruct.create(scope, local);
    scope.holdForScope(struct);
    for (MemberType m : s.getMember()) {
        QName qname = m.getIdltype();
        IdlType type = findType(qname);
        if (!undefinedCircular && !(type instanceof IdlSequence)) {
            String mlocal = qname.getLocalPart();
            String[] mname = unscopeName(mlocal);
            undefinedCircular = null != root.lookup(mname, true);
        }
        struct.addToScope(IdlField.create(struct, m.getName(), type));
    }
    if (undefinedCircular) {
        scope.parkHeld();
    } else {
        scope.promoteHeldToScope();
        if (struct.isCircular()) {
            // resolving this struct closed a recursion
            scope.flush();
        }
    }
    return struct;
}
Also used : IdlStruct(org.apache.cxf.tools.corba.common.idltypes.IdlStruct) IdlSequence(org.apache.cxf.tools.corba.common.idltypes.IdlSequence) MemberType(org.apache.cxf.binding.corba.wsdl.MemberType) QName(javax.xml.namespace.QName) IdlString(org.apache.cxf.tools.corba.common.idltypes.IdlString) IdlType(org.apache.cxf.tools.corba.common.idltypes.IdlType)

Aggregations

QName (javax.xml.namespace.QName)1 MemberType (org.apache.cxf.binding.corba.wsdl.MemberType)1 IdlSequence (org.apache.cxf.tools.corba.common.idltypes.IdlSequence)1 IdlString (org.apache.cxf.tools.corba.common.idltypes.IdlString)1 IdlStruct (org.apache.cxf.tools.corba.common.idltypes.IdlStruct)1 IdlType (org.apache.cxf.tools.corba.common.idltypes.IdlType)1