Ok, so I see that full path of exception class is mapped to the retrieved exception id (with leading "IDL:" and following ":1.0" strings, and optionally "Exception" substring removed). Then this is how I'll do it.

Thanks,
Wojtek

Raymond Feng wrote:
To map CORBA exceptions (object id) to java exceptions, we can follow the logic in org.apache.tuscany.sca.binding.ejb.util.EJBHandler.java:

        } catch (ApplicationException ex) {
               in = (InputStream)ex.getInputStream();
               try {
org.apache.tuscany.sca.binding.ejb.corba.Java2IDLUtil.throwException(methodInfo.getMethod(), in);
                   return null;
               } catch (Throwable e) {
                   throw new RemoteException(e.getMessage(), e);
               }
           } catch (RemarshalException ex) {
               return invokeRemoteCORBACall(stub, methodName, args);
           } finally {
               stub._releaseReply(in);
           }
       } catch (SystemException ex) {
           throw Util.mapSystemException(ex);
       }

Please note org.apache.tuscany.sca.binding.ejb.corba.Java2IDLUtil.throwException maps the object id to a declared java exception.

Thanks,
Raymond

Reply via email to