public static String readCorrelationId ( Message message ) { if ( ! ( message instanceof SoapMessage ) ) { return null ; } String correlationId = null ; Header hdCorrelationId = ( ( SoapMessage ) message ) . getHeader ( CORRELATION_ID_QNAME ) ; if ( hdCorrelationId != null ) { if ( hdCorrelationId . getObject ( ) instanceof String ) { correlationId = ( String ) hdCorrelationId . getObject ( ) ; } else if ( hdCorrelationId . getObject ( ) instanceof Node ) { Node headerNode = ( Node ) hdCorrelationId . getObject ( ) ; correlationId = headerNode . getTextContent ( ) ; } else { LOG . warning ( "Found CorrelationId soap header but value is not a String or a Node! Value: " + hdCorrelationId . getObject ( ) . toString ( ) ) ; } } return correlationId ; }
Read correlation id .