I think there's some deep context that is worth knowing.
Elegantly addressing a woman has become old-fashioned in most situations. "Ma'am" is still conventional for the military. It is still conventional in some customer-service jobs, but this is fading out. It isn't really used in day-to-day life -- doing so is quite old-fashioned, or considered overly supplicating, or may even cause offense.
For a rule of thumb, just avoid elegantly addressing a woman unless you've been told to by an employer, and when you do it will usually be "ma'am".
The soldier did the conventional thing for his job, but the reason the woman is not considered to have gone totally out of line is because (A) she is his superior, and (B) as stated above, elegantly addressing a woman is considered archaic by most. Some of the audience will see her as tough, humorous and defiant of outdated conventions, though some of the audience will see her as quick to anger, rude and insecure.
The "deep context" I want to get to here is that gender relations have become quite strained in the western world. Addressing or referring to a woman in any matter has the potential to raise problems. For example, all of the following have raised issues for me or people I know:
- "girl" -- can be taken as saying that she is immature, or inferior to men
- "woman" -- can be taken as saying she is old, or that you are trying to score points by not saying girl
- "female" -- has overly clinical connotations, can be taken as creepy or objectifying
- "lady" -- usually considered old fashioned, or sucking up too much, sometimes to the point of being considered creepy
- "ma'am" -- as above
- "miss" -- in some cases disrespectful because it implies youth or inferiority, and in some cases old-fashioned/awkward because it's what a child calls their teacher
- "she"/"her" -- disrespectful compared to her name
- "chicks" -- taken as disrespectful, implies objectification or inferiority, avoid this
- "love"/"doll"/"babe"/"sweetie"/"honey" -- extremely old fashioned, taken as disrespectful, implies objectification or inferiority, absolutely avoid (unless she is your partner, then it's usually okay, though again a few will be offended)
At the same time, you could use any of these words and never run into any trouble (except the last set).
It's a potential minefield even for native English speakers. There is a lot of nuance and context to understand, and something that pleases one person will upset another. Fortunately, most people are quite forgiving, especially if English is not your first language. Just be aware that someone may get offended no matter what word you choose to use -- if this does happen, it's better just to apologize and move on than dive into such a sensitive issue.