return xpath.evaluate("/map/entry[@key = 'message']/@value", new InputSource(new StringReader(xmlResponse)));
}
private ProtocolMetaData parseForProtocolMetaData(String xmlResponse) throws XPathExpressionException {
final ProtocolMetaData protocolMetaData = new ProtocolMetaData();
final HTTPContext httpContext = new HTTPContext(this.configuration.getRemoteServerAddress(),
this.configuration.getRemoteServerHttpPort());
final XPath xpath = XPathFactory.newInstance().newXPath();
NodeList servlets = (NodeList) xpath.evaluate("/map/entry[@key = 'properties']/map/entry[@value = 'Servlet']",
new InputSource(new StringReader(xmlResponse)), XPathConstants.NODESET);
for (int i = 0; i < servlets.getLength(); i++) {
httpContext.add(new Servlet(servlets.item(i).getAttributes().getNamedItem("key").getNodeValue(), this.deploymentName));
}
protocolMetaData.addContext(httpContext);
return protocolMetaData;
}