[CXF-5891] Avoid building DOM document when no header is found in the message