Chapter 7. Web Service consumer 131
We continue the same pattern to retrieve the other values and display them as shown in
Figure 7-31.
Figure 7-31 Completed JSP
By clicking the Source tab of the JSP editor window, we can look at the HTML/JSP code that
makes up our JSP. The code should look similar to Example 7-4.
Example 7-4 JSP source
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM Software Development Platform">
<META http-equiv="Content-Style-Type" content="text/css">
<LINK href="theme/Master.css" rel="stylesheet" type="text/css">
<TITLE>ShowTPFTime.jsp</TITLE>
</HEAD>
<BODY>
<P>This is a Java Server Page which utilizes a Web Service on z/TPF to retrieve
the current z/TPF system time.<BR>
<BR>
<jsp:useBean id="tpfService"
class="com.ibm.tpf.timeservice.TimePortProxy"></jsp:useBean><BR>
<%com.ibm.tpf.timeservice.GetTimeRequestMessage timeReq = new
com.ibm.tpf.timeservice.GetTimeRequestMessage();
com.ibm.tpf.timeservice.GetTimeResponseMessage timeResp;
timeResp = tpfService.getTime(timeReq);
%>
<BR>The current z/TPF system time is:<BR>