I use JAXB to create XML messages. The XML I need to create is (for the sake of simplicity):
An empty tag for a String object is essentially the empty string.
If you call the following, you will get what you are looking for:
request.setHeader("")
I should also note that in XML the following two declarations of a header are idential. Both of these have no child text nodes. These are essentially the same and will be treated the same by all XML parsers: