230
Developing Client Applications to Use a Web Service
<%@ taglib prefix="x" uri="/WEB INF/x rt.tld" %>
  Order:
  Status:
  Name:
Code Example 5.13
JSP Generating a Web Service Response
In this example, the J2EE application first places the order details document
received from the service in the request scope using the key 
orderDetailsXML
.
The next lines are JSP code that use the 
x:out
 JSTL tag to access the order details
XML content. These lines of code select fields of interest (such as order identifier,
status, and name fields) using XPath expressions, and convert the data to HTML
for presentation to a browser client. The JSP code relies on JSTL tags to access
these portions of the order details document. For example, the JSTL tag 
x:out
,
which uses XPath expressions, accesses the order identifier, status, and name
fields in the order details document. When the JSP processing completes, the
result is identical to the HTML page shown in Code Example 5.10.
5.3.6 Handling Exceptions
Two types of exceptions occur for client applications that access Web services:
system exceptions and service specific exceptions, which are thrown by a service
endpoint. System exceptions are thrown for such conditions as passing incorrect
parameters when invoking a service method, service inaccessibility, network error,
or some other error beyond the control of the application. Service exceptions, which
are mapped from faults, are thrown when a service specific error is encountered.
The client application must deal with both types of exceptions.
5.3.6.1
System Exceptions
System exceptions generally involve unanticipated errors such as a network
timeout or an unavailable or unreachable server that occur when invoking a Web
service. Although system exceptions are usually out of the control of the client
developer, you should still be aware that these errors may occur, and you should






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