a method and apparatus for attaching plastic ends to plastic or plastic coated rims of container bodies by heating the ends , to soften the material of the rims , and then spin welding the ends on the bodies .