Search in sources :

Example 1 with CorbaObjectReader

use of org.apache.cxf.binding.corba.runtime.CorbaObjectReader in project cxf by apache.

the class CorbaAnyEventProducer method getAnyContainedType.

private CorbaObjectHandler getAnyContainedType(Any a) {
    CorbaObjectHandler result = null;
    TypeCode tc = a.type();
    QName containedName = new QName("AnyContainedType");
    QName idlType = null;
    if (CorbaUtils.isPrimitiveTypeCode(tc)) {
        idlType = CorbaAnyHelper.getPrimitiveIdlTypeFromTypeCode(tc);
        result = new CorbaPrimitiveHandler(containedName, idlType, tc, null);
    } else if (tc.kind().value() == TCKind._tk_any) {
        idlType = CorbaConstants.NT_CORBA_ANY;
        result = new CorbaAnyHandler(containedName, idlType, tc, null);
        ((CorbaAnyHandler) result).setTypeMap(handler.getTypeMap());
    } else {
        idlType = handler.getTypeMap().getIdlType(tc);
        result = CorbaHandlerUtils.initializeObjectHandler(orb, containedName, idlType, handler.getTypeMap(), serviceInfo);
    }
    InputStream is = a.create_input_stream();
    CorbaObjectReader reader = new CorbaObjectReader(is);
    reader.read(result);
    return result;
}
Also used : TypeCode(org.omg.CORBA.TypeCode) QName(javax.xml.namespace.QName) InputStream(org.omg.CORBA.portable.InputStream) CorbaObjectReader(org.apache.cxf.binding.corba.runtime.CorbaObjectReader)

Aggregations

QName (javax.xml.namespace.QName)1 CorbaObjectReader (org.apache.cxf.binding.corba.runtime.CorbaObjectReader)1 TypeCode (org.omg.CORBA.TypeCode)1 InputStream (org.omg.CORBA.portable.InputStream)1