I am currently facing an issue with converting an XML string into an object generated with AXIS2 and JAXB (unmarshalling). I'm having trouble accessing the attributes of the object using the getter methods. Strangely, all the getter methods of the printResult object return null values. However, when I invoke the toString() method, the complete object with all the set values is displayed.
I'm perplexed about why the getter methods are not returning any values and how I can retrieve the attributes using the getter methods. Any help or suggestions would be greatly appreciated.
Thank you in advance!
PrintResultType printResult = PrintResultType.Factory.parse(xmlResponse);
PrintDetailsType[] arr = printResult.getPrintDetailsArray();
log.info("arr == null: " + (arr == null) + " arr size: " + arr.length);
// arr == null ? : false arr size 0
BaggageType baggageType = printResult.getBaggageType();
log.info("BaggageType == null: " + (BaggageType == null));
// BaggageType == null : true
log.info(("Unmarshalled printResult:\n" + printResult.toString()));
// The object is logged with all subobjects and array