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;
}
Aggregations