Bayern Munich booked their place in the final of the DFB-Pokal after a dramatic 3-2 win at Werder Bremen on Wednesday.