When we purchased Tobi from a pet store 5 years ago (I didn't know then that puppies should never, ever, be bought from a pet store), he was used to pooping and peeing inside his crate. It took a long time to get him to poop where we wanted him to since he was so used to doing it inside his crate.
Motivation is the only thing that worked and being consistent and vigilent about taking him out.
Dogs aim to please so if he had an accident right after we brought him inside, we showed him our dissaproval just with the tone of our voice. It took weeks, but he caught on. I think love and constrant training are the key factors.
Good luck.