Mini Usb Broken. Solder to cable?

My mini usb (like this: http://www.feastronics.co.uk/USERIMAGES/IMGP2835.JPG) is broken.
Perhaps a broken conection as it only remains charging (for my headset) while it is in a certain position which as you cam imagine doesn't last long.

Would anyone recommend splicing the wires and soldering to the charging cable? And therefore which wires!?
Thanks :)

You can check the circuit board, if you are lucky it is just a broken solder connection and re-soldering it fixes it.
If not you will need to get an identical plug to replace it, I say identical as there at least three different models I know of.
They all work the same but have a different layout for the soldering.

The connection between the connect and PCB may be damaged. Resolding it may fix the problem. If not, yes you can remove the connector and solder wires directly to the contacts. Google mini USB wiring diagram. For the most part wire color codes are universal but cheap crap from china doesn't apply. You'll want to do a contanuity check to make sure you know which wire is which.