just use hot glue. it won't burn through the case, or melt the foam. a soldering iron runs hotter than a glue gun. you do want to not bath the foam in the glue, as the glue will harden the foam.
but go with the glue that you are most comfortable with. i'd tape out the foam where it will be and go with the spray adhesive.