• Post Reply Bookmark Topic Watch Topic
  • New Topic

Operations throwing RemoteException(s)  RSS feed

 
Marco Palazzini
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI
I am developing WebServices using Sun's WSDP and xrpcc tool.
- Each WS is developed through a ServiceIF interface and a ServiceImpl implementation class.
- ServiceIF extends java.rmi.Remote
- each method (operation) is declared as throwing java.rmi.RemoteException
At this point, using stub classes, you do RPC calls to the methods.
I would like to define my own hierarchy of exceptions derived from RemoteException and use it to keep control over eventual failures of the operations.
What happens is:
- a method throws MyRemoteException (which extends RemoteException),
- on the client side I catch generic RemoteException
- on the client side the class of the caught exception results in RemoteException and not MyRemoteException
Do you know how I could get MyRemoteException on the client side?
I tried also using nested exceptions:
- the method throws an RemoteException having MyRemoteException nested
- the exception caught is RemoteException but when i try to get the nested exception using the getCause() method i get a om.sun.xml.rpc.client.SenderException.
Thanks
Marco
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!