Created
December 8, 2008 15:14
-
-
Save blastura/33479 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ include file="/includes/head.jsp" %> | |
<%@page import="se.umu.cs.edu.jap.highscoreservice.HighScoreServiceClient"%> | |
<%@page import="se.umu.cs.edu.jap.highscoreservice.Entry"%> | |
<%@page import="java.net.URL"%> | |
<%@page import="java.net.MalformedURLException"%> | |
<h1>HighScoreService</h1> | |
<% | |
try { | |
String urlString = "http://localhost:8081/axis2/services/HighScoreService"; | |
URL url = new URL(urlString); | |
HighScoreServiceClient client = new HighScoreServiceClient(url); | |
Entry[] entries = client.retrieve(); | |
out.println("<p>Retrieved " + entries.length + " entries from " + urlString + ".</p>"); | |
out.println("<ol>"); | |
for (Entry entry : entries) { | |
out.println("<li>"); | |
out.println("Name: " + entry.getName() | |
+ ", date: " + entry.getDate() | |
+ ", score: " + entry.getScore() +"."); | |
out.println("</li>"); | |
} | |
out.println("</ol>"); | |
} catch (MalformedURLException e) { | |
// TODO - fix error message | |
e.printStackTrace(); | |
} | |
%> | |
<%@ include file="/includes/foot.jsp" %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment