In-line ball valve with thread or welding ends