Search in sources :

Example 71 with CorbaType

use of org.apache.cxf.binding.corba.wsdl.CorbaType in project cxf by apache.

the class TypesUtils method getConstValueByName.

public static String getConstValueByName(AST node, TypeMappingType typeMap) {
    List<CorbaType> types = typeMap.getStructOrExceptionOrUnion();
    for (Iterator<CorbaType> it = types.iterator(); it.hasNext(); ) {
        CorbaType corbaType = it.next();
        if (corbaType instanceof Const) {
            Const corbaConst = (Const) corbaType;
            String name = corbaConst.getQName().getLocalPart();
            if (name.endsWith(node.getText())) {
                return corbaConst.getValue();
            }
        }
    }
    return null;
}
Also used : CorbaType(org.apache.cxf.binding.corba.wsdl.CorbaType) Const(org.apache.cxf.binding.corba.wsdl.Const)

Example 72 with CorbaType

use of org.apache.cxf.binding.corba.wsdl.CorbaType in project cxf by apache.

the class CorbaPrimitiveMap method get.

public Object get(QName key) {
    CorbaType corbaTypeImpl = null;
    QName type = corbaPrimitiveMap.get(key.getLocalPart());
    if (type != null) {
        corbaTypeImpl = new CorbaType();
        corbaTypeImpl.setQName(type);
        corbaTypeImpl.setType(key);
        corbaTypeImpl.setName(key.getLocalPart());
    }
    return corbaTypeImpl;
}
Also used : CorbaType(org.apache.cxf.binding.corba.wsdl.CorbaType) QName(javax.xml.namespace.QName)

Aggregations

CorbaType (org.apache.cxf.binding.corba.wsdl.CorbaType)72 QName (javax.xml.namespace.QName)45 XmlSchemaType (org.apache.ws.commons.schema.XmlSchemaType)23 MemberType (org.apache.cxf.binding.corba.wsdl.MemberType)13 AST (antlr.collections.AST)9 XmlSchemaElement (org.apache.ws.commons.schema.XmlSchemaElement)9 TypeMappingType (org.apache.cxf.binding.corba.wsdl.TypeMappingType)8 Test (org.junit.Test)8 XmlSchemaSequence (org.apache.ws.commons.schema.XmlSchemaSequence)7 Alias (org.apache.cxf.binding.corba.wsdl.Alias)6 Anonsequence (org.apache.cxf.binding.corba.wsdl.Anonsequence)6 Sequence (org.apache.cxf.binding.corba.wsdl.Sequence)6 Struct (org.apache.cxf.binding.corba.wsdl.Struct)6 Union (org.apache.cxf.binding.corba.wsdl.Union)6 File (java.io.File)5 Definition (javax.wsdl.Definition)5 ArrayList (java.util.ArrayList)4 Anonarray (org.apache.cxf.binding.corba.wsdl.Anonarray)4 Anonstring (org.apache.cxf.binding.corba.wsdl.Anonstring)4 Array (org.apache.cxf.binding.corba.wsdl.Array)4