A federal judge issued a temporary restraining order on Thursday forbidding enforcement of a law in the Long Island community of Oyster Bay that made it a crime to solicit employment by shouting at cars and waving arms or signs.