List<Object> list = new ArrayList<Object>();
String namespace = qname.getNamespaceURI();
String localPart = qname.getLocalPart();
BlockFactory blockFactory = (JAXBBlockFactory)
FactoryRegistry.getFactory(JAXBBlockFactory.class);
Message m = messageCtx.getMessage();
JAXBBlockContext jbc = new JAXBBlockContext(jaxbcontext);
// If allRoles is not specified, pass in a set of roles.
// The headers must support that role.
RolePlayer rolePlayer = null;
if (allRoles == false) {
rolePlayer = getRolePlayer();
}
if(m.getNumHeaderBlocks()>0){
// Get the list of JAXB Blocks
List<Block> blockList = m.getHeaderBlocks(namespace,
localPart,
jbc,
blockFactory,
rolePlayer);