private boolean detectWSAddressingFeature ( InterceptorProvider provider , Bus bus ) { //detect on the bus level if ( bus . getFeatures ( ) != null ) { Iterator < Feature > busFeatures = bus . getFeatures ( ) . iterator ( ) ; while ( busFeatures . hasNext ( ) ) { Feature busFeature = busFeatures . next ( ) ; if ( busFeature instanceof WSAddressingFeature ) { return true ; } } } //detect on the endpoint/client level Iterator < Interceptor < ? extends Message > > interceptors = provider . getInInterceptors ( ) . iterator ( ) ; while ( interceptors . hasNext ( ) ) { Interceptor < ? extends Message > ic = interceptors . next ( ) ; if ( ic instanceof MAPAggregator ) { return true ; } } return false ; }
detect if WS Addressing feature already enabled .