private Boolean messageIdHeaderExists(List<SoapHeader> headers) {
        for(SoapHeader header:headers) {
            if(header.getName().getLocalPart().equalsIgnoreCase(LOCAL_NAME)) {
                return true;
            }
        }
        return false;
    }
private Boolean messageIdHeaderExists ( List < SoapHeader > headers ) { for ( SoapHeader header : headers ) { if ( header . getName ( ) . getLocalPart ( ) . equalsIgnoreCase ( LOCAL_NAME ) ) { return true ; } } return false ; }
Checks if the MessageID header exists in the list of headers.

@param headers list of headers
@return true if the MessageID header exists, false if not