In the Widal test, the antigen O is considered IgM somatic and appears first and represents the initial response to acute typhoid fever, while the IgG flagellar H antigen usually develops more slowly but it persists for longer.