assertNotNull("type is null", type);
// read ref
SoapRefType soapRefType = new SoapRefType(type);
SoapRef ref = (SoapRef) soapRefType.readObject(reader, context);
reader.readToEnd();
// read the trailing blocks (referenced objects)
List<Object> roots = trailingBlocks.readBlocks(root, context);
assertNotNull(roots);