expectErrorCode(req, 404, "Response code 404 required for invalid WSDL url.");
}
@Test
public void testGetImportedXSD() throws Exception {
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",