}
}
public static String getEndpointAddress(Message m) {
String address = null;
Destination d = m.getExchange().getDestination();
if (d != null) {
if (d instanceof AbstractHTTPDestination) {
EndpointInfo ei = ((AbstractHTTPDestination)d).getEndpointInfo();
HttpServletRequest request = (HttpServletRequest)m.get(AbstractHTTPDestination.HTTP_REQUEST);
Object property = request != null
? request.getAttribute("org.apache.cxf.transport.endpoint.address") : null;
address = property != null ? property.toString() : ei.getAddress();
} else {
address = m.containsKey(Message.BASE_PATH)
? (String)m.get(Message.BASE_PATH) : d.getAddress().getAddress().getValue();
}
} else {
address = (String)m.get(Message.ENDPOINT_ADDRESS);
}
if (address.startsWith("http") && address.endsWith("//")) {