String location = node.getTextContent();
node.setTextContent(adaptLocation(location, locationBase));
}
}
} catch (ParserConfigurationException e) {
throw new WsException("Unable to configure parser for WSDL adapter: " + e.getMessage());
} catch (SAXException e) {
throw new WsException("Error parsing supplied WSDL: " + e.getMessage());
}
ByteArrayOutputStream baos = new ByteArrayOutputStream(2048);
try {
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
DOMSource source = new DOMSource(doc);
StreamResult result = new StreamResult(baos);
transformer.transform(source, result);
} catch (TransformerException e) {
throw new WsException("Error transforming WSDL: " + e.getMessage());
}
return baos.toByteArray();
}