public CorbaStreamable createStreamableException(Any exception, RaisesType exRaises) {
// first, we need to get the definition of the exception. All we have from the raises type is the
// exception idl type
QName exIdlType = exRaises.getException();
List<CorbaTypeMap> typeMaps = corbaBinding.getCorbaTypeMaps();
Exception ex = null;
for (Iterator i = typeMaps.iterator(); i.hasNext();) {
CorbaTypeMap tm = (CorbaTypeMap)i.next();
if (tm.getTargetNamespace().equals(exIdlType.getNamespaceURI())) {
ex = (Exception)tm.getType(exIdlType.getLocalPart());
break;
}
}
if (ex == null) {
throw new CorbaBindingException("Unable to find definition for thrown exception");
}
TypeCode tc = CorbaUtils.getTypeCode(orb, exIdlType, typeMaps);
// TODO: Revisit - What should the name of the object holder be?
CorbaExceptionHandler obj = new CorbaExceptionHandler(new QName(ex.getName()), exIdlType, tc, ex);
List<MemberType> exMembers = ex.getMember();
for (Iterator i = exMembers.iterator(); i.hasNext();) {
MemberType member = (MemberType)i.next();
QName memberName = new QName(member.getName());
QName memberType = member.getIdltype();
CorbaObjectHandler memberObj =