Soapy’s first plan was to go to a fine restaurant and have a good dinner. He would order something that would fill his stomach and not something that would anger the people at the restaurant. After his meal, he would say that he had no money to pay for it. This would lead to the cops arresting him without much scene and handing him over to the judge. The judge would then do the needful.
The plan did not work because as soon as the waiter saw his broken old shoes and the torn clothes that covered his legs, he turned Soapy around and led him out of the restaurant.