Skip to content

Instantly share code, notes, and snippets.

@blastura
Created December 8, 2008 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blastura/33479 to your computer and use it in GitHub Desktop.
Save blastura/33479 to your computer and use it in GitHub Desktop.
<%@ 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