/* Not thread safe. Calling method must ensure all calls to this method are synchronized. */
private byte[] adaptWsdl(HttpServletRequest req, String locationBase) throws IOException, WsException {
Document doc;
try {
// read the schema to DOM representation
DocumentBuilderFactory fact = DocumentBuilderFactory.newInstance();
fact.setNamespaceAware(true);
DocumentBuilder bldr = fact.newDocumentBuilder();
doc = bldr.parse(m_wsdlProvider.getWSDL(req));
Element schema = doc.getDocumentElement();
NodeList services = schema.getElementsByTagNameNS(WSDLSOAP_NAMESPACE, "address");
for (int i = 0; i < services.getLength(); i++) {
Node node = services.item(i).getAttributes().getNamedItem("location");