July 20, 2011, 2:36 a.m.
posted by maxidax
The JAXR API has two mechanisms for returning exceptions. A method can throw them like any other exception, or return them in a BulkResponse object. Most of the JAXR BusinessLifeCycleManager and BusinessQueryManager return multiple results from a method. For example, saveOrganizations() returns a Collection of UUID Key objects, one for each Organization saved. When a JAXR Inquiry or Publishing method returns multiple results, it may return UDDI registry exceptions in a Collection, rather than just throw a single exception. These are accessed by calling BulkResponse.getExceptions().
If, however, an abnormal condition is encountered by the client-side runtime of the JAXR implementation (for example, a NullPointerException ), the method will throw a JAXRException instead of returning it in the BulkResponse object. In a nutshell, only SOAP faults generated by the UDDI registry are returned as exceptions in a BulkResponse object.
If the method returns only a single value (something other than BulkResponse), then all exceptions, even UDDI registry exceptions, are thrown directly from the method.
The UDDI registry exceptions are of type javax.xml.registry.Registry Exception or one of its subtypes: SaveException, DeleteException, and FindException. The messages returned with these exceptions provide fault codes and descriptions that correlate with the error codes shown in Figure.