Message message = PhaseInterceptorChain.getCurrentMessage();
String base = (String)message.get(Message.REQUEST_URL);
String ctxUri = (String)message.get(Message.PATH_INFO);
WSDLGetUtils utils = new WSDLGetUtils();
EndpointInfo info = server.getEndpoint().getEndpointInfo();
Map<String, String> locs = utils.getSchemaLocations(message,
base,
ctxUri,
info);
List<Element> ret = new LinkedList<Element>();
for (Map.Entry<String, String> xsd : locs.entrySet()) {
if (StringUtils.isEmpty(id)
|| id.equals(xsd.getKey())) {
String query = xsd.getValue().substring(xsd.getValue().indexOf('?') + 1);
Map<String, String> params = UrlUtilities.parseQueryString(query);
ret.add(utils.getDocument(message, base, params, ctxUri, info).getDocumentElement());
}
}
return ret;
}