In the method void generate(MappingGenerator gen ) the line: String realm=getContent( getChild( lcN, "realm-name")); gets the realm but does nothing with it later...
Yup, apparently unused, so I removed it. Thanks for pointing that out.