WebServiceEndpoint wse = ejbEndpoint.getEndpoint();
if ("http".equals(scheme) && wse.isSecure()) {
//redirect to correct protocol scheme if needed
logger.log(Level.WARNING, LogUtils.INVALID_REQUEST_SCHEME,
new Object[]{wse.getEndpointName(), "https", scheme});
URL url = wse.composeEndpointAddress(new WsUtil().getWebServerInfoForDAS().getWebServerRootURL(true));
StringBuilder sb = new StringBuilder(url.toExternalForm());
if (query != null && query.trim().length() > 0) {
sb.append("?");
sb.append(query);
}