* @pre message is outbound
* @pre requestor role
*/
private boolean hasUsingAddressing(Message message) {
boolean ret = false;
Endpoint endpoint = message.getExchange().get(Endpoint.class);
if (null != endpoint) {
Boolean b = (Boolean)endpoint.get(USING_ADDRESSING);
if (null == b) {
EndpointInfo endpointInfo = endpoint.getEndpointInfo();
List<ExtensibilityElement> endpointExts = endpointInfo != null ? endpointInfo
.getExtensors(ExtensibilityElement.class) : null;
List<ExtensibilityElement> bindingExts = endpointInfo != null
&& endpointInfo.getBinding() != null ? endpointInfo
.getBinding().getExtensors(ExtensibilityElement.class) : null;
List<ExtensibilityElement> serviceExts = endpointInfo != null
&& endpointInfo.getService() != null ? endpointInfo
.getService().getExtensors(ExtensibilityElement.class) : null;
ret = hasUsingAddressing(endpointExts) || hasUsingAddressing(bindingExts)
|| hasUsingAddressing(serviceExts);
b = ret ? Boolean.TRUE : Boolean.FALSE;
endpoint.put(USING_ADDRESSING, b);
} else {
ret = b.booleanValue();
}
}
return ret;