First of all, I just want to say that I have read the getting started guide and most of the relevant threads in this forum, still I cannot find what's wrong with the following code! :(
So here it goes..
public static void createHeaderPart(WordprocessingMLPackage wordprocessingMLPackage)
throws Exception {
MainDocumentPart mainDocumentPart = wordprocessingMLPackage.getMainDocumentPart();
HeaderPart headerPart1 = new HeaderPart();
headerPart1.setPackage(wordprocessingMLPackage);
Hdr hdr1 = getHdr(true);
headerPart1.setJaxbElement(hdr1);
Relationship r1 = ...