Search in sources :

Example 1 with IdlAttribute

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

the class WSDLToIDLAction method createIdlAttribute.

public void createIdlAttribute(org.apache.cxf.binding.corba.wsdl.OperationType opType, String name) throws Exception {
    String attrNm = name.substring(5, name.length());
    IdlAttribute attr;
    IdlDefn idlDef = intf.lookup(attrNm);
    if (idlDef == null) {
        if (name.startsWith("_get_")) {
            ArgType t = opType.getReturn();
            attr = IdlAttribute.create(intf, attrNm, findType(t.getIdltype()), true);
        } else {
            ParamType arg = opType.getParam().iterator().next();
            attr = IdlAttribute.create(intf, attrNm, findType(arg.getIdltype()), false);
        }
        intf.addAttribute(attr);
    } else {
        attr = (IdlAttribute) idlDef;
        if (attr.readonly() && name.startsWith("_set_")) {
            attr.setReadonly(false);
        }
    }
}
Also used : ArgType(org.apache.cxf.binding.corba.wsdl.ArgType) IdlDefn(org.apache.cxf.tools.corba.common.idltypes.IdlDefn) IdlAttribute(org.apache.cxf.tools.corba.common.idltypes.IdlAttribute) IdlString(org.apache.cxf.tools.corba.common.idltypes.IdlString) ParamType(org.apache.cxf.binding.corba.wsdl.ParamType)

Aggregations

ArgType (org.apache.cxf.binding.corba.wsdl.ArgType)1 ParamType (org.apache.cxf.binding.corba.wsdl.ParamType)1 IdlAttribute (org.apache.cxf.tools.corba.common.idltypes.IdlAttribute)1 IdlDefn (org.apache.cxf.tools.corba.common.idltypes.IdlDefn)1 IdlString (org.apache.cxf.tools.corba.common.idltypes.IdlString)1