To sweat a joint there are some requirements that must be met or the joint absolutely will not hold. 1. The pipe must be free of water. 2. The pipe ends and the fitting insides must be sanded or brushed perfectly clean. 3. The joint must be fluxed. 4. Heat must be applied to the fitting so as to heat the joint to the point the solder will flow when applied to the joint. Melting the solder with the torch will not produce a good joint. Those conditions are inflexible. What you have to do get the water out of the pipes depends on the situation. You may have to make several cuts to get the pipe dry then reassemble. You may have to get creative.