client.setExceptionsThrownOnErrorStatus(true);
WebRequest req =
new GetMethodQueryWebRequest(CONTEXT_URL + "/services/Greeter?wsdl");
WebResponse res = client.getResponse(req);
assertEquals(200, res.getResponseCode());
assertEquals("text/xml", res.getContentType());
Document doc = DOMUtils.readXml(res.getInputStream());
assertNotNull(doc);
assertValid("//wsdl:operation[@name='greetMe']", doc);
assertValid("//wsdlsoap:address[@location='" + CONTEXT_URL + "/services/Greeter']", doc);
req =
new GetMethodQueryWebRequest(CONTEXT_URL + "/services/Greeter2?wsdl");
res = client.getResponse(req);
assertEquals(200, res.getResponseCode());
assertEquals("text/xml", res.getContentType());
doc = DOMUtils.readXml(res.getInputStream());
assertNotNull(doc);
assertValid("//wsdl:operation[@name='greetMe']", doc);
assertValid("//wsdlsoap:address[@location='http://cxf.apache.org/Greeter']", doc);
Endpoint.publish("/services/Greeter3", new org.apache.hello_world_soap_http.GreeterImpl());
req =
new GetMethodQueryWebRequest(CONTEXT_URL + "/services/Greeter3?wsdl");
res = client.getResponse(req);
assertEquals(200, res.getResponseCode());
assertEquals("text/xml", res.getContentType());
doc = DOMUtils.readXml(res.getInputStream());
assertNotNull(doc);
assertValid("//wsdl:operation[@name='greetMe']", doc);
assertValid("//wsdlsoap:address[@location='" + CONTEXT_URL + "/services/Greeter3']", doc);