String xml = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'><soapenv:Body>" +
"<root xmlns='http://springframework.org/spring-ws'><child /></root>" +
"</soapenv:Body></soapenv:Envelope>";
TransportInputStream tis = new MockTransportInputStream(new ByteArrayInputStream(xml.getBytes()));
WebServiceMessage message = messageFactory.createWebServiceMessage(tis);
StringResult result = new StringResult();
transformer.transform(message.getPayloadSource(), result);
try {
transformer.transform(message.getPayloadSource(), result);
fail("TransformerException expected");
}
catch (TransformerException expected) {
// ignore
}