return o1.compareToIgnoreCase(o2);
}
});
for (int i=0; i<headers.length; i++) {
Header header = headers[i];
if ("Location".equals(header.getName())
&& endpointURLPrefix != null
&& outMsgCtx.getProperty(NhttpConstants.SERVICE_PREFIX) != null) {
headerMap.put(header.getName(),
header.getValue().replaceAll(endpointURLPrefix,
(String) outMsgCtx.getProperty(NhttpConstants.SERVICE_PREFIX)));
} else {
headerMap.put(header.getName(), header.getValue());
}
}
responseMsgCtx.setProperty(MessageContext.TRANSPORT_HEADERS, headerMap);
}