System.out.println ("Student Name is : " + student.getName ()); System.out.println ("Student Age is : " + student.getAge ());
Also it might be worth mentioning that you need to generate the java class from the XSD file you've mentioned. I used the utility plug-in for Eclipse called XJC. Then the code in your example will find the java class for StudentType. Might be obvious for experienced programmers but not for people new to Jaxb.