Other Considerations for Web Services
So far, the Web Services you have seen have used simple parameters, such as strings and integers and have been free from errors. However, in the real world, most systems will need to pass complex types such as arrays, classes, and data structures and will need to cope with issues such as error handling. During the rest of today, you will look at such issues.
Web Service Errors and Exceptions
The use of Web Service protocols implies that your application is making calls across network boundaries. As such, you must be prepared to handle any network-related errors that occur. As the Web Service interface is based around a Java remote interface, any client code must catch and handle java.rmi.RemoteException
Get Sams Teach Yourself J2EE™ in 21 Days, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.