ServletUnitClient client = newClient();
client.setExceptionsThrownOnErrorStatus(true);
WebRequest req
= new GetMethodQueryWebRequest(CONTEXT_URL + "/services/greeter?wsdl");
WebResponse res = client.getResponse(req);
assertEquals(200, res.getResponseCode());
String text = res.getText();
assertEquals("text/xml", res.getContentType());
assertTrue(text.contains(CONTEXT_URL + "/services/greeter?wsdl=test_import.xsd"));
req = new GetMethodQueryWebRequest(CONTEXT_URL + "/services/greeter?wsdl=test_import.xsd");
res = client.getResponse(req);
assertEquals(200, res.getResponseCode());
text = res.getText();
assertEquals("text/xml", res.getContentType());
assertTrue("the xsd should contain the completType SimpleStruct",
text.contains("<complexType name=\"SimpleStruct\">"));
}