assertValid("//h:sayHiResponse", doc);
}
@Test
public void testGetServiceList() throws Exception {
ServletUnitClient client = newClient();
client.setExceptionsThrownOnErrorStatus(false);
WebResponse res = client.getResponse(CONTEXT_URL + "/services");
WebLink[] links = res.getLinks();
assertEquals("There should get two links for the service", 3, links.length);
Set<String> links2 = new HashSet<String>();
for (WebLink l : links) {
links2.add(l.getURLString());
}
assertTrue(links2.contains(CONTEXT_URL + "/services/greeter?wsdl"));
assertTrue(links2.contains(CONTEXT_URL + "/services/greeter2?wsdl"));
assertEquals("text/html", res.getContentType());
res = client.getResponse(CONTEXT_URL + "/services/");
links = res.getLinks();
links2.clear();
for (WebLink l : links) {