RFT - move unmarshalling to util method with dynamic cast