Immobilize the bass in the case with bubble wrap (only use the wrap with big bubbles). Then inside the box containing the case, pad 3 inches on each end to prevent damage from dropping on the end. Take up the space between the sides and the box by wrapping three 1-foot strips of bubble wrap around the case. Shipping without a case is much easier. Wrap bubble wrap around the ends of the bass so it won't move in the box. Let it stick out so it's a crush fit lengthwise also. I had some really good foam (I think it was acoustic foam) and that worked, too. I also slide a piece of tiny-cell bubble wrap between the frets and the strings so there's no chance they'll meet.
