Search in sources :

Example 1 with NamedType

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

the class CorbaTypeMap method getIdlType.

// This is used by the Any type when trying to re-construct the type stored inside a
// CORBA Any.
public QName getIdlType(TypeCode tc) {
    String repId = null;
    try {
        repId = tc.id();
    } catch (org.omg.CORBA.TypeCodePackage.BadKind ex) {
        // No id has been set.
        return null;
    }
    if (repId == null) {
        return null;
    }
    Set<Map.Entry<String, CorbaType>> mapSet = typeMap.entrySet();
    for (Iterator<Map.Entry<String, CorbaType>> i = mapSet.iterator(); i.hasNext(); ) {
        Map.Entry<String, CorbaType> entry = i.next();
        if (entry.getValue() instanceof NamedType) {
            NamedType n = (NamedType) entry.getValue();
            if (n.getRepositoryID().equals(repId)) {
                return new QName(getTargetNamespace(), entry.getKey());
            }
        }
    }
    return null;
}
Also used : CorbaType(org.apache.cxf.binding.corba.wsdl.CorbaType) NamedType(org.apache.cxf.binding.corba.wsdl.NamedType) QName(javax.xml.namespace.QName) Map(java.util.Map) HashMap(java.util.HashMap)

Aggregations

HashMap (java.util.HashMap)1 Map (java.util.Map)1 QName (javax.xml.namespace.QName)1 CorbaType (org.apache.cxf.binding.corba.wsdl.CorbaType)1 NamedType (org.apache.cxf.binding.corba.wsdl.NamedType)1