Ok depending how much volume is flowing If you can solder under a little pressure.
I some times use bread to stop the flow of water solder on a copper by male adapter using a swirl jet tip (4,200 degree flame) and then after the joint is soldered I screw on a IPS valve and then go about doing the rest of the job.
There is a compression fitting that if code approved in your area can get you out of a tough spot like this sounds like.
Freezing the line is another possibility IF you can stop this flow. Good luck