public void domPox() throws Exception {
WebServiceTemplate template = new WebServiceTemplate(new DomPoxMessageFactory());
template.setMessageSender(new HttpComponentsMessageSender());
String content = "<root xmlns='http://springframework.org/spring-ws'><child/></root>";
StringResult result = new StringResult();
template.sendSourceAndReceiveToResult(baseUrl + "/pox", new StringSource(content),
result);
assertXMLEqual(content, result.toString());
try {
template.sendSourceAndReceiveToResult(baseUrl + "/errors/notfound",
new StringSource(content), new StringResult());
Assert.fail("WebServiceTransportException expected");
}
catch (WebServiceTransportException ex) {
//expected
}
try {
template.sendSourceAndReceiveToResult(baseUrl + "/errors/server",
new StringSource(content), result);
Assert.fail("WebServiceTransportException expected");
}
catch (WebServiceTransportException ex) {
//expected
}