I think the best suggestion so far has been to put them in a difficult situation where they need to work together to get free. That's a real unifying storyline, shows them they can depend on each other even if they don't like each other, and makes them appreciate each others value more. Were I DMing such a scenario, I would probably use covert methods of reward and punishment to encourage them to work together. The brash fighter who breaks free first and refuses to help his companions gets hit by a trap that the rogue could have spotted, the spellcaster who thinks he's better than anybody get in a fight with something that can dispel magic, that sort of thing. And of course when they do work together, make the results more successful. If one character 'aids' another on a skill check, have it go down perfectly.
It would mean fudging rolls and a bit of railroading, but you only need to do it for a little while for the players to figure out that it's in the best interests of their HP to work together.
Edit Question: Is it the players who aren't cooperating, or just their characters? If it's just the characters, I would use the above method, but if there are problems between the players (lack of mutual respect, animosity, rivalries) then a whole different approach is needed.