this cast shouldn't be needed, I double-checked locally and as long as the object you're unmarshalling in to is of the right runtime type, it should work