232
Developing Client Applications to Use a Web Service
    java.lang.Runtime
    /order_tracking_system_exception.jsp
Code Example 5.14
Using the Servlet Error Messaging System
Although they do not directly interact with the user, workflow clients imple 
mented as EJB components can benefit from transactional processing, particularly
if using container managed transactions. However, since you cannot assume that
the Web service is also transactional, you might have to manually back out some
of your changes if other Web services are involved in the processing. Keep in
mind that backing out changes can be difficult to accomplish and is prone to prob 
lems. 
An J2EE component that receives a 
RemoteException
 when accessing a
service may retry connecting to the service a set number of times. If none of the
retries are successful, then the client can log an error and quit the workflow. Or,
the client may forward the unit of work to another process in the workflow and let
that component access the same service at a later point or use a different service.
EJB component based clients using DII may locate an alternative service using
the JAXR API from a registry.
5.3.6.2
Service Exceptions
Service exceptions occur when a Web service call results in the service returning a
fault. A service throws such faults when the data presented to it does not meet the
service criteria. For example, the data may be beyond boundary limits, it may dupli 
cate other data, or it may be incomplete. These exceptions are defined in the ser 
vice's WSDL file as 
operation
 elements, and they are referred to as 
wsdl:fault
elements. These exceptions are checked exceptions in client applications. For exam 
ple, a client accessing the order tracking service may pass to the service an order
identifier that does not match orders kept by the service. The client may receive an
OrderNotFoundException
, since that is the error message defined in the WSDL
document:
message="tns:OrderNotFoundException"/>






New Page 1








Home : About Us : Network : Services : Support : FAQ : Control Panel : Order Online : Sitemap : Contact : Terms Of Service

java web hosting

 

 

 Our partners: | PHP: Hypertext Preprocessor | Best Web Hosting | Java Servlet Web Hosting | Inexpensive Web Hosting |

Jsp Web Hosting | Cheapest Web Hosting | Jsp Hosting | Cheap Hosting

 

Virtualwebstudio. Business web hosting division of Web Design Plus. All rights reserved