code: public static String readFlowId(Message message) {
          if (!(message instanceof SoapMessage)) {
              return null;
          }
          String flowId = null;
          Header hdFlowId = ((SoapMessage)message).getHeader(FLOW_ID_QNAME);
          if (hdFlowId != null) {
              if (hdFlowId.getObject() instanceof String) {
                  flowId = (String)hdFlowId.getObject();
              } else if (hdFlowId.getObject() instanceof Node) {
                  Node headerNode = (Node)hdFlowId.getObject();
                  flowId = headerNode.getTextContent();
              } else {
                  LOG.warning("Found FlowId soap header but value is not a String or a Node! Value: "
                                 + hdFlowId.getObject().toString());
              }
          }
          return flowId;
      }
docs: Read flow id.
  
  @param message the message
  @return flow id from the message