I've created XML beans from an XSD and now trying to load this object graph into Velocity Map in order to access it from the velocity template:

// xmlResource is the the xml file that needed to be parsed
QuizAdminProductConfiguration productProfile = QuizAdminProductConfiguration.Factory.parse(xmlRes ource.getInputStream(), validationOptions);

// adding the top xmlbean as a key/value pair to a Map, passed to Velocity
//================================================== =====
if (productProfile instanceof QuizAdminProductConfiguration) {
QuizAdminProductConfiguration quizAdminConfig = (QuizAdminProductConfiguration) productProfile;
templateLocation = "com/lexisnexis/risk/phoenix/profile/summary/velocity/VerificationSummary.vm";
map.put("quizAdminConfig", quizAdminConfig);

output = VelocityEngineUtils.mergeTemplateIntoString(veloci tyEngine, templateLocation, map);

// Walking the object graph in a velocity template (.vm)and accessing the props
//================================================== ====
<h3>Profile ID: $productprofile.productProfileID</h3>

Exit above Profile ID: $productprofile.productProfileID</a>.


When I run the junit test, I except to see value for $productprofile.productProfileID but exact same output is displayed as above. I have created a jar with the xmlbeans and added to the classpath. Getting no errors, just no values for the above. If I manually add a Key/value (map.put("$productprofile.productProfileID", "bar")) and then run my example, I get the correct/expected Value (bar) displayed from the above template. I am new to xmlbeans/velocity. What am I doing wrong? Any help would be greatly appreciated.